• 返回
  • 最后更新
  • 2020-10-27 23:23:42 +0800 CST

Centos7 下安装 MySQL8

rpm -ivh http://repo.mysql.com/mysql80-community-release-el7-1.noarch.rpm

yum install mysql-server

启动

systemctl enable mysqld

systemctl start mysqld

如果需要降低 mysql 密码强度, 可以登录 mysql 客户端设置, mysql8 初始密码在 /var/log/mysqld.log 查看

set global validate_password.policy=0;
set global validate_password.length=6;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'myroot';