使用Navicat Premium 12远程连接阿里云MySQL8.0
使用Navicat Premium 12远程连接阿里云MySQL8.0
1.先登陆mysql:
mysql -u root -p
2.再输入:
grant all privileges on *.* to 'root'@'%' identified by 'yourPassword';#填密码
3.然后就报了这个错:
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
解决办法;
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> grant all privileges on *.* to 'root'@'%' identified by 'yourPassword';#填密码
Query OK, 0 rows affected (0.00 sec)
4.然后用Navicat Premium 12远程连接阿里云MySQL8.0
如果连接失败的话,应该是没有在阿里云后台系统管理中,添加安全组
填写安全规则时,协议类型选了mysql3306后端口自动填写,授权对象填写0.0.0.0/0即可
参考资料:
https://www.cnblogs.com/iosdev/archive/2013/07/15/3190431.html