关闭

(笔记)远程连接MySQL出现ERROR 2003 (HY000): Can't connect to MySQL server on ip (111)

标签: mysql远程连接
214人阅读 评论(1) 收藏 举报
分类:

参考:http://blog.csdn.net/attilax/article/details/8595696

            http://www.111cn.net/database/mysql/48040.htm

命令 mysql -h ip -uroot -p 远程登录mysql的时候出现error 2003错误,百度原因,说是由于mysql下的bind-address为127.0.0.1,默认为localhost登录,不能远程,所以要把/etc/mysql/my.cnf下的bind-address注释掉,然后重新启动mysql就可以远程登录了。

我的my.cnf是个连接文件没有bind-address,是在/etc/mysql/mysql.conf.d/mysqld.cnf下找到bind-address的,注释掉,然后/etc/init.d/mysql restart就可以远程登录了。


前后登录mysql,use mysql然后select user,host from user;可以看到user和host有所变化。


0
0
查看评论

MySQL远程连接ERROR 2003 (HY000):Can't connect to MySQL server on'XXXXX'(111) 的问题

装了个navicat ,然后去连接mysql服务器,一直连不上,一开始以为是防火墙问题,后来防火墙都关闭,  iptable服务关闭,还是不行,网上查了下:主要是因为设置了bind_address=127.0.0.1   原文引用:   问题描述: 从一...
  • qustdjx
  • qustdjx
  • 2014-05-25 09:57
  • 117592

Ubuntu ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)

配置远程连接mysqlMySQL>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;MySQL>FLUSH PR...
  • dongwuming
  • dongwuming
  • 2016-07-25 10:42
  • 4213

MySQL远程访问报错ERROR 2003 (HY000):Can't connect to MySQL server on'XXXXX'(111)

从一台linux远程连接另一台linux上的MySQL, mysql -hxxx.xxx.xxx.xxx -uroot -p 出现ERROR 2003 (HY000): Can't connect to MySQL server on 'xxx.xxx.xxx.xxx...
  • a5nan
  • a5nan
  • 2017-06-05 10:04
  • 620

Mysql 报错:ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.xxx.xxx' (111)

首先看下 sudo vi /etc/mysql/my.cnf 配置文件#bind-address = 127.0.0.1 【将其注释】sudo service mysql restart ##将mysql重启,如果还连不上,就禁掉防火墙sudo ufw disable然后mysql再重...
  • u010578251
  • u010578251
  • 2016-08-16 10:03
  • 291

ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.10.210' (111) 解决方法

今天在测试mysql的连接时候,发现连接不通过,并报错ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.10.210' (111) 测试代码:require 'mysql2' clie...
  • Richar1
  • Richar1
  • 2016-03-21 19:29
  • 5783

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 'xxx.xxx.xx.xxx' (111)  perro...
  • shaochenshuo
  • shaochenshuo
  • 2015-12-30 15:03
  • 4464

解决"ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.247.128' (111)"

1. 问题描述 在连接数据库时出现连接失败信息: xx@ubuntu:~$ mysql -h192.168.247.128 -uroot -p123456 mysql: [Warning] Using a password on the command line interface can be i...
  • Cryhelyxx
  • Cryhelyxx
  • 2015-01-25 19:03
  • 2961

远程无法访问mysql Can't connect to MySQL server on "host" (111)

默认情况下Mysql只允许本地登录,所以需要修改配置文件将地址绑定给注释掉: vim /etc/mysql/my.cnf # Instead of skip-networking the default is now to listen only on # localhost whic...
  • shannonlee
  • shannonlee
  • 2014-01-13 20:34
  • 1395

MySQL 服务无法启动 ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

1.问题情况:下载了mysql5.7绿色免安装版,但是一直出现下面的错误: mysql 服务无法启动 ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061) 如下两图所示: ...
  • csy2961903
  • csy2961903
  • 2016-05-08 12:32
  • 2019

MySQL错误ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)的解决

Windows下面运行好好的MySQL突然间就出了这样的错误:ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)解决方法: 1. 进入MySQL安装目录下面的bin目录 2. 找...
  • zheng_integer
  • zheng_integer
  • 2017-03-15 19:14
  • 9711
    个人资料
    • 访问:30299次
    • 积分:571
    • 等级:
    • 排名:千里之外
    • 原创:19篇
    • 转载:45篇
    • 译文:0篇
    • 评论:3条
    最新评论