1. 主要参数贴子
CentOS 下 MySQL 8.0 安装部署,超详细! - 腾讯云开发者社区-腾讯云
2. 碰到问题
(1)在安装mysql时,提示
Public key for mysql-community-common-8.0.30-1.el7.x86_64.rpm is not installed.
解决办法:
(2) 在登陆mysql欲修改密码为123456时,mysql提示
Your password does not satisfy the current policy requirements
原文要求
set global validate_password.policy=0;
set global validate_password.length=1;
但是我在设置时,仍然被系统提示需要先修改密码
You must reset your password using ALTER USER statement before excuting this statement.
解决办法:
先修改密码为一个符合规则的复杂密码,然后再修改上面这两条密码策略。改好策略后,再把密码改为123456.
(3)如果想要远程登录, 则需要进行update更新下root账号的权限
mysql> update mysql.user set host='%' where user="root"; Query OK, 1 row affected (0.10 sec) Rows matched: 1 Changed: 1 Warnings: 0
(4)关闭防火墙