1.进入阿里云服务器
ssh 用户名@ip
2.进入数据库
mysql -u root -p
3.设置mysql数据库权限(允许其他服务器连接数据库)
grant all privileges on . to \'用户名\'@\'%\' identified by \'密码\' with grant option;
grant all privileges on . to \'root\'@\'%\' identified by \'123456t\' with grant option;
(ps:想要root用户使用密码123456从任何主机连接到mysql服务器)
修改mysql权限
4.进入数据库mysql查看user表
select host,user from user
查看是否修改成功
5.本地打开Navicat,进行配置