Ubuntu7.10中MySQL默认只能本机访问的解决

2014-11-24 17:29:32 · 作者: · 浏览: 0

1、在命令行底下打开用户权限:grant all privileges on drupal.* to user@192.168.1.80 identified by 'user-password';


在管理员界面可以通过用户管理add host->any host来添加访问权限(root用户默认只能访问本机,新添加的用户可远程)


2、取消mysql本机绑定:


编辑/etc/mysql/my.cnf


# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1


将”bind-address = 127.0.0.1“注释


sudo /etc/init.d/./mysql restart重启即可远程访问。