First, download Percona5.7 from the official website
Be aware that the server is the version. My choice here is Percona-server-5.7.16-10-ra0c7d0d-el6-x86_64-bundle.tar.
tar xvf percona-server-5.7. --ra0c7d0d-el6-x86_64-bundle. Tar
Able to see 7 files extracted
RPM-IVH percona-server-server--5.7. 10.1el6.x86_64.rpm percona-server-client--5.7. 10.1el6.x86_64.rpm percona-server-shared--5.7. -10.1. el6.x86_64.rpm
At this point you can see the prompt
RPM-IVH percona-server-devel--5.7. -10.1. el6.x86_64.rpm
Change the user and the group to which the MySQL database directory belongs, and then start the MySQL database
chown mysql:mysql/var/lib/mysql-rservice mysql restart
Five, login MySQL
After formatting, the system does not prompt for the root password, and mysql5.7 does not generate a. mysql_secret file to record the initial password, as in previous versions.
After installing MySQL using the rpm command on the CentOS 6 system, the MySQL configuration file is/etc/my.cnf, open the file, you can see the configuration information of MySQL DataDir and log files, and the following:
Open the/var/log/mysqld.log file, search string a temporary password is generated for [email protected]:, you can find this random password, usually this line of logs in the first few lines of the log file, more easily seen.
NOTE 2: after entering MySQL, do anything to have you must reset your password using the ALTER USER statement before executing this statement. Tips
MySQL>1820ALTERUSER statement before executing this statement.
The reason is that after using root to enter MySQL, the root password must be changed before other operations can be performed.
MySQL> SET= PASSWORD ('1234'
Percona 5.7 Installation