1.阿里云后台安全实例,添加开启mysql端口3306,入方向
2.登录到mysql, 授权外部可链接
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '密码' WITH GRANT OPTION;
FLUSH PRIVILEGES;
3.修改my.cnf配置。添加
bind-address = 0.0.0.0
4.重启mysql,/etc/init.d/mysql restart
5.还不行就重启服务器。
1.阿里云后台安全实例,添加开启mysql端口3306,入方向
2.登录到mysql, 授权外部可链接
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '密码' WITH GRANT OPTION;
FLUSH PRIVILEGES;
3.修改my.cnf配置。添加
bind-address = 0.0.0.0
4.重启mysql,/etc/init.d/mysql restart
5.还不行就重启服务器。