1.下载并安装mysql
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
2.重启mysql服务
service mysqld restart
3.修改root用户密码
/usr/bin/mysqladmin -u root password root
4.增加用户并授权
以root用户身份登录mysql,增添用户test,设置密码123456,并授权