centos7 安装 mysql80

yum install https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
yum clean all
yum makecache
yum install mysql-community-server
systemctl enable mysqld.service
systemctl start mysqld.service
grep 'password' /var/log/mysqld.log
mysql -uroot -p
password
alter user root@localhost identified with mysql_native_password by 'Root123$';
set global validate_password.check_user_name = 0;
set global validate_password.length = 4;
set global validate_password.policy = 0;
alter user root@localhost identified with mysql_native_password by 'root';
update mysql.user set host = '%' where user = 'root';
flush privileges;
show variables like 'validate%';
select host,user,plugin,authentication_string from mysql.user;
exit;

你可能感兴趣的:(centos7 安装 mysql80)