mysql无法远程连接

远程链接前,需要给一个远程连接权限;

格式:grant 权限 on 数据库名.表名 to 用户@登录主机 identified by “用户密码”;
grant select,update,insert,delete on *.* to root@‘%’ identified by “root”;

无法远程连接主要几个问题:

1、端口是否链接正确;端口是否有权限;

2、远程连接用户是否有远程连接权限;

3、msyql默认的bind-address是127.0.0.1,要注释掉。修改my.conf。

 4、hosts中localhost是否指向127.0.0.1

错误提示为:ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)

bind-address后面增加远程访问IP地址或者禁掉这句话就可以让远程机登陆访问了。

#skip-external-locking
#
# 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
#

转载随意~:陶醉seo » mysql无法远程连接

赞 (13)
分享到:更多 ()