First, download Percona5.7 from the official website
Address: https://www.percona.com/downloads/Percona-Server-5.7/LATEST/
Be aware that the server is the version. My choice here is Percona-server-5.7.16-10-ra0c7d0d-el6-x86_64-bundle.tar.
Second, decompression
tar xvf percona-server-5.7. --ra0c7d0d-el6-x86_64-bundle. Tar
Able to see 7 files extracted
Third, installation
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
Iv. initialization
Mysqld--initialize
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
Mysql-uroot-p
Note 1:
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:
datadir=/var/lib/mysqllog-error=/var/log/mysqld.log
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