《MYSQL数据库远程连接MySQL数据库问题总结》要点:
本文介绍了MYSQL数据库远程连接MySQL数据库问题总结,希望对您有用。如果有疑问,可以联系我们。
MYSQL必读
MYSQL必读1:出现ERROR 2003 (HY000): Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (111)
- [root@cluster-00 ~]# mysql -h 10.20.34.76 -u root -p
- Enter password:
- ERROR 2003 (HY000): Can't connect to MySQL server on '10.20.34.76' (111)
- [root@cluster-00 ~]# perror 111
- OS error code 111: Connection refused
- [root@cluster-00 ~]#
MYSQL必读
MYSQL必读
MYSQL必读
MYSQL必读原因1: 服务器10.20.34.76不能访问或ping通.这个很好验证.
MYSQL必读原因2: MySQL服务没有启动.这个验证也非常方便.
MYSQL必读原因3: MySQL配置了参数skip-networking,注销该参数即可
MYSQL必读
MYSQL必读2: ERROR 2003 (HY000): Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (113)
- [root@cluster-00 ~]# mysql -h 10.20.34.76 -uroot -p
- Enter password:
- ERROR 2003 (HY000): Can't connect to MySQL server on '10.20.34.76' (113)
- [root@cluster-00 ~]# perror 113
- OS error code 113: No route to host
MYSQL必读
MYSQL必读关闭防火墙(不推荐)或是开放相关端口(默认为3306)后,问题即可解决.
MYSQL必读
MYSQL必读3: ERROR 1045 (28000): Access denied for user 'root'@'xxx.xxx.xxx.xxx' (using password: YES)
- [root@cluster-00 ~]# mysql -h 10.20.34.76 -uroot -p
- Enter password:
- ERROR 1045 (28000): Access denied for user 'root'@'192.168.9.224' (using password: YES)
- [root@cluster-00 ~]#
MYSQL必读原因:root账户权限不够,可能仅仅只用于本地,不能远程登录.需要设置账号权限.注意:这里仅仅是测试图方便,正常情况是不应该开放root的远程访问权限的.出于安全因素考虑,一般应该关闭远程访问.
转载请注明本页网址:
http://www.vephp.com/jiaocheng/5776.html