yum install mysql
yum install mysql-devel
wget http://dev.mysql.com/get/mysql80-community-release-el7-5.noarch.rpm
rpm -ivh mysql80-community-release-el7-5.noarch.rpm
yum install mysql-community-server
service mysqld restart
service mysqld status
grep ‘password’ /var/log/mysqld.log
mysql -u root -p —登录mysql,并输入初始密码
alter user ‘root’@’localhost’ identified by ‘这里填你要的密码’;(
填写密码的时候满足8位并且尽量是混合密码(大小写英文、下划线、数字))
1、先重新登录
执行 mysql -u root -p
2、执行 use mysql;
3、执行 update user set host = ‘%’ where user = ‘root’;
4、执行 FLUSH PRIVILEGES;