2059 - Authentication plugin ‘caching_sha2_password‘ cannot be loaded
原因:mysql8的密码的默认加密方式是caching_sha2_password,要将其改为mysql_native_password
第一步,执行命令
alter user ‘root’@’%’ identified with mysql_native_password by ‘Admin@123’;
第二步,执行命令flush privileges使权限配置项立即生效。再次尝试连接Mysql,连接成功。
1130 - Host '121.32.76.246 is not allowed to connect to this MysQL server
update mysql.user set Host
= ‘%’ where Host
= ‘::1’ and User = ‘root’;
参考:https://www.cnblogs.com/codecat/p/10729033.html
1449 - The user specified as a definer (‘mysql.infoschema’@localhost) does not exist
2003- Can’t connect to MySQL server on ‘xxx.xxx.xxx.xxx’ (10060 “Unknown error”) .
防火墙的问题,把防火墙开了再关掉
重启
systemctl restart firewalld.service
开放端口
firewall-cmd --zone=public --add-port=3306/tcp --permanent
#命令含义
--zone #作用域
--add-port=3306/tcp #添加端口,格式为:端口/通讯协议
--permanent #永久生效
重启
systemctl restart firewalld.service
关闭
systemctl stop firewalld.service