第一步:在阿里云服务器中开放3306端口
第二步:修改配置,bind-address改为0.0.0.0(最好注释掉)
第三步:登录mysql修改系统表user
最后添加远程访问权限
use mysql;
Grant all privileges on *.* to 'root'@'%' identified by 'password' with grant option;
flush privileges;
还不行,重启一下mysql服务:service mysql restart