Http://dev.mysql.com/doc/refman/5.7/en/linux-installation-yum-repo.html
MySQL Yum repo installation instructions
http://dev.mysql.com/downloads/repo/yum/
Download the corresponding version of the EL5 version of
Execute the corresponding version of the command, mine is centos5.11
sudo rpm-uvh mysql57-community-release-el5-7.noarch.rpm
If the display fails, the execution
RPM--import/etc/pki/rpm-gpg/rpm-gpg-key-centos-5
In the execution
sudo rpm-uvh mysql57-community-release-el5-7.noarch.rpm
After success, start the installation
sudo yum install Mysql-community-server
Start Mysql,service mysqld Start
Display failed
ERROR 2002 (HY000): Can ' t connect to local MySQL server through socket '/var/lib/mysql/mysql.sock ' (2)
Perform MySQL initialization
/usr/sbin/mysqld--initialize--user=mysql--datadir=/var/lib/mysql
Service Mysqld Start success!
Find MySQL initial password
grep "Password"/var/log/mysqld.log
Modify mysql5.7 Initial Password
See http://www.cnblogs.com/kxxx/p/5916863.html
Vim/etc/my.conf
Add Skip-grant-tables=1
Restart MySQL Service
Go to MySQL
Update user Set authentication_string = password (' root '), password_expired = ' N ', password_last_changed = Now () where user = ' root ';
Restart Service
centos5.11 Repo Installation mysql5.7