`

mysql设置可远程连接

阅读更多

方法一:

mysql>update user set host=hostname where user=username
mysql>flush privileges;

 其中hostname为主机或者ip名,%为任意ip

方法二 通过授权:

grant 权限 on 数据库名.表名 to 用户@登录主机 identified by "用户密码";

mysql>grant all privileges on *.* to username@hostname identified by password with grant option;
mysql>flush privileges;

 其中hostname为主机或者ip名,%为任意ip

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics