首页 > 代码库 > 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)的处理办法
远程连接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)的处理办法
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。