解决"ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.247.128' (111)"
2015-01-25 19:03
363 查看
1.问题描述
在连接数据库时出现连接失败信息:
2.解决方法
出现上面mysql数据库连接失败的原因是多种的,其中可用pingip来看看网络是否畅通,下面是本人的解决方法。
这是因为之前我进行了root密码设置操作,
注意上面的--skip-grant-tables--skip-networking,只允许本地socket连接,放弃对TCP/IP的监听
在解决上述问题之前,我们先保证已经对mysql数据库进行远程授权,
进入/usr/local/mysql/support-files/下,执行以下命令:
这里得到了mysql数据库的配置文件my.cnf,再重启mysql服务,然后执行mysql-h192.168.247.128-uroot-p(ps:主机ip请输入自己的)
并输入数据库用户root的密码即可连接mysql数据库。如下:
OK,Enjoyit!!!
相关文章推荐
- ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.10.210' (111) 解决方法
- centos6下解决"ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.2.200' (113)"
- 解决ERROR 2003 (HY000): Can't connect to MySQL server on "host" (111)
- 解决ERROR 2003 (HY000): Can't connect to MySQL server on "host" (111)
- mysql绿色版安装问题解决(ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061))
- ERROR 2003 (HY000): Can't connect to MySQL server on '10.16.115.101' (111)
- mysql绿色版安装问题解决(ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061))
- MySQL远程连接ERROR 2003 (HY000):Can't connect to MySQL server on'XXXXX'(111) 的问题
- ERROR 2003 (HY000): Can't connect to MySQL server on 'xxx.xxx.xx.xxx' (111)
- MySQL远程连接ERROR 2003 (HY000):Can't connect to MySQL server on'XXXXX'(111) 的问题
- ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061) 解决办法
- ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.114' (111)
- 一个无法访问mysql的错误: ERROR 2003 (HY000): Can't connect to MySQL server on 'x.x.x.x' (111)
- ERROR 2003 (HY000): Can't connect to MySQL server on '223.3.46.114' (111)
- MySQL远程连接ERROR 2003 (HY000):Can't connect to MySQL server on'XXXXX'(111) 的问题
- ERROR 2003 (HY000): Can't connect to MySQL server on "host" (111)
- MySQL远程连接ERROR 2003 (HY000):Can't connect to MySQL server on'XXXXX'的问题
- 解决ERROR 2003 (HY000): Can't connect to MySQL server on "host"
- MySQL errorNumber 2003的解决 ERROR 2003: Can 't connect to MySQL server on 'localhost '
- ERROR 2003: Can't connect to MySQL server on localhost (10061)" 解决办法