MySQL允许远程控制

别人需要连接自己数据库的时候需要对其开发远程连接。

1、进入MySQL

2、使用mysql库执行use mysql;

3、查询表中 执行:select user,password,host from user;

4、执行:grant all privileges on *.* to root@"xxx.xxx.xxx.xxx" identified by "密码";

xxx.xxx.xxx.xxx :表示为允许访问的主机ip;密码:表示本数据库的连接密码

5、执行之后再次查询:select user,password,host from user;

 

posted @ 2019-05-08 14:18  不言-  阅读(1122)  评论(0编辑  收藏  举报