Install Red Hat 7.2 Development Pack Java package all installed
Download MySQL 5.7.12
wget Http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.12-1.el7.x86_64.rpm-bundle.tar
See if MySQL is installed
Rpm-qa | grep MySQL
Uninstall MySQL
Rpm-e–nodeps
Unzip MySQL
TAR-XVF Mysql-5.7.12-1.el7.x86_64.rpm-bundle.tar
Install MySQL
Yum Install mysql-community-{client,common,libs}-*
RPM-IVH mysql-community-server-5.7.12-1.el7.x86_64.rpm
Start the MySQL service
Start with the usual boot method service mysqld start
Z is using the latest Start method Systemctl start Mysqld.service
View the status of the MySQL server
sudo service mysqld status
Generate Random passwords
grep ' temporary password '/var/log/mysqld.log
2016-04-30t11:25:13.632616z 1 [Note] A temporary password is generated for [email protected]: X9. L=p4iylzd
Configure random passwords
Mysql-uroot-p
X9. L=p4iylzd
ALTER USER ' root ' @ ' localhost ' identified by ' hanzheng.123 ';
The field stored in password 5.7 is no longer password, it becomes authentication_string
Update Mysql.user set Authentication_string=password (' root ') where user= ' root ';
If you change the root password, you will need to reset the root password if you log in to the MySQL system for the first time using the root user.
SET password=password (' root ');
Re-Login
Mysql-uroot-p
Hanzheng.123
Red Hat 7.2 rpm install MySQL 5.7.12