读书人

mysql设立可远程连接

发布时间: 2012-09-03 09:48:39 作者: rapoo

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

读书人网 >Mysql

热点推荐