首先在服务器管理控制台设置防火墙规则
添加规则
使用root登录到mysql
添加一个用户名,权限为%的远程连接用户
grant all on *.* to ‘yuancheng‘@‘%‘ identified by ‘123456‘;
flush privileges;
ok,就可以用Navicat测试了
查看用户列表:
select host,user from mysql.user;
删除某个用户:
use mysql;
delete from user where user=‘yuancheng‘ and host=‘%‘;
flush privileges;
更改某个用户的密码:
update mysql.user set password=password(‘new password‘) where user=‘指定用户‘ and host=‘%‘;
摘自:
https://my.oschina.net/liujiest/blog/634150 # 远程连接
http://blog.51cto.com/jschu/1693379 # 用户操作