centos7 安装mysql
1.安装
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.安装启动
service mysqld restart
3.登陆
mysql -u root
4.修改密码
set password for 'root'@'localhost' =password('123456');
5.设置远程访问
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456!' WITH GRANT OPTION;