码迷,mamicode.com
首页 > 数据库 > 详细

ERROR 2003 (HY000): Can't connect to MySQL server on 'ip address' (111)的处理办法

时间:2016-12-29 07:53:05      阅读:319      评论:0      收藏:0      [点我收藏+]

标签:error   远程连接mysql   sql数据库   socket   connect   setting   host   cal   not   

远程连接mysql数据库时可以使用以下指令

mysql -h 192.168.1.104 -u root -p

如果是初次安装mysql,需要将所有/etc/mysql/内的所有配置文件的bind-address=127.0.0.1全都注释掉

[mysqld]
#
# * Basic Settings
#
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
lc-messages-dir = /usr/share/mysql
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

如果不配置的话会出ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘ip address‘ (111)故障。

ERROR 2003 (HY000): Can't connect to MySQL server on 'ip address' (111)的处理办法

标签:error   远程连接mysql   sql数据库   socket   connect   setting   host   cal   not   

原文地址:http://www.cnblogs.com/LTSperl/p/6231083.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!