wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum install mysql-community-server
进入数据库:mysql -uroot
修改密码:use mysql
update user set password=password(‘admin’)where user=‘root’;
退出:quit
重启:service mysql restart