安装
1. yum -y install wget
2.wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
3.rpm -ivh mysql-community-release-el7-5.noarch.rpm
4.yum install mysql-server
部署
mysql -u root -p // 登录mysql
grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option // 开启远程访问 %标识全部 也可以写IP root是远程访问密码
flush privileges //重载权限
exit //退出
systemctl start mysqld.service //开启
systemctl stop mysqld.service //停止
systemctl restart mysqld.service //重启