1. $ wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
2. $ sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
3. $ sudo yum install mysql-server
4. $ mysql -u root
5. $ sudo chown -R openscanner:openscanner /var/lib/mysql
6.
$ service mysqld restart
7. $ mysql -u root
8.
mysql > use mysql;
mysql > update user set password=password(‘123456‘) where user=‘root‘;
mysql > exit;
转载自:
http://blog.csdn.net/HANLIPENGHANLIPENG/article/details/52168305?locationNum=3&fps=1