1.mysql在阿里云服务器安装:
https://blog.csdn.net/qq_45441466/article/details/109670194
2.出现了2003的错误
按:https://www.linuxidc.com/Linux/2020-04/162998.htm
安装了iptables-services。
yum install -y iptables-services
1.编辑
vim /etc/sysconfig/iptables
2.添加下面命令开启3306端口
-A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
3.重启防火墙并且设置为开机自启
service iptables restart #重启防火墙
systemctl enable iptables.service #设置开机自动启动
3.出现了2059的错误
navicat里的2003错误解决了!但是又出现新错误!!2059!!看样子像是密码错误
于是找到文章:https://blog.csdn.net/zhichaosong/article/details/103140916
原因是文中说的:
原因是 MySQL8 之前的版本中加密规则是 mysql_native_password,而在MySQL8 之后,加密规则是 caching_sha2_password,解决问题方法有两种:一种是升级 Navicat 驱动,一种是把 MySQL用户登录密码加密规则还原成 mysql_native_password。
终于问题得到解决了!!!,navicat远程连接数据库成功!