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

ubuntu安装完mysql,使用apt-get命令安装的,默认是只允许本地访问的

[email protected]:~/software# mysql -uroot -p123456 -h10.16.115.101 -P3306

ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘10.16.115.101‘ (111)

默认配置文件:

需要把bind-address注释掉

重启mysql服务

[email protected]:~/software# service mysql restart

mysql stop/waiting

mysql start/running, process 6738

测试连接

[email protected]:~/software# mysql -uroot -p123456 -h10.16.115.101 -P3306

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 141

Server version: 5.5.40-0ubuntu0.12.04.1 (Ubuntu)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.

mysql> exit

Bye

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

时间: 2024-11-09 06:49:46

ERROR 2003 (HY000): Can't connect to MySQL server on '10.16.115.101' (111)的相关文章

ERROR 2003 (HY000): Can’t connect to MySQL server on ‘127.0.0.1’ (111) 修复无法连接到MySQL服务器

昨天重新装好Ubuntu然后配置完Django和pycharm后忘了测试mysql,今天配置时遇到了问题: ERROR 2003 (HY000): Can't connect to MySQL server on '(IP地址)' (111) 修复无法连接到MySQL服务器 这是一个链接MySQL的常见问题 下面是处理它的基本步骤. 1.如果数据库服务器是在远程计算机上,然后尝试使用测试客户端-服务器连接ping命令,例如: $ ping server_ip_address Ping主机 一旦有

Linux中mysql进入命令行报错:MYSQL ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.99.192' (111)

场景:在Linux中安装mysql01和mysql02,通过VIP虚出一个VIP=192.168.99.192,mysql01为主ip为192.168.99.153,mysql02为备机ip为192.168.99.154 此时VIP在mysql01上通过 mysql01上连接VIP :mysql -h 192.168.99.192 -P 3306   结果是可以正常进入mysql命令行: 通过mysql02上远程连接VIP 会在界面上报错:mysql error 2003(HY000):Can'

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

mac  homebrew 安装的mysql5.6 除本机外无法被其他ip的电脑访问. 网上查原因 有几个: 1.my.cnf配置中 查看是否有   bind-address = 127.0.0.1  和  skip-networking  前面加 #注释掉. 注意:homebrew安装的mysql有好几个配置文件,不确定的可以查找一下. sudo find / -name my.cnf #skip-networking #bind-address = 127.0.0.1 我的mac中找到4个,

ERROR 2003 (HY000): Can't connect to MySQL server on '129.28.149.240' (111) mysql 无法远程连接

环境: ubuntu  mysql 一. 查看端口 可以看到mysql监控的是本机Ip [email protected]:/etc/mysql/mysql.conf.d# netstat -apn|grep 3306 tcp 0 127 0.0.0.1:3306 0.0.0.0:* LISTEN 12770/mysqld 二. 修改mysql 配置文件 将bind-address = 127.0.0.1 # 表示允许任何主机登陆MySQL port=3306 改为 bind-address =

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

问题描述:  从一台linux远程连接另一台linux上的MySQL, 出现ERROR 2003 (HY000): Can't connect to MySQL server on 'ip'(111)错误.   [[email protected] ~]$ mysql -hxxx.xxx.xxx.85 -uroot -p Enter password:  123456   ERROR 2003 (HY000): Can't connect to MySQL server on 'xxx.xxx.

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

装了个navicat ,然后去连接mysql服务器,一直连不上,一开始以为是防火墙问题,后来防火墙都关闭, iptable服务关闭,还是不行,网上查了下:主要是因为设置了bind_address=127.0.0.1 原文引用: 问题描述: 从一台linux远程连接另一台linux上的MySQL, 出现ERROR 2003 (HY000): Can't connect to MySQL server on 'xxx.xxx.xxx.85'(111)错误. [mysql@vvmvcs0 ~]$ my

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

MySQL远程连接ERROR 2003 (HY000):Can't connect to MySQL server on'XXXXX'的问题 问题描述: 从一台linux远程连接另一台linux上的MySQL, 出现ERROR 2003 (HY000): Can't connect to MySQL server on 'xxx.xxx.xxx.85'(111)错误. [[email protected] ~]$ mysql -hxxx.xxx.xxx.85 -uroot -p Enter pa

ERROR 2003 (HY000): Can't connect to MySQL server

一.问题的提出 /usr/local/webserver/mysql/bin/mysql -u root -h 172.29.141.112  -p -S /tmp/mysql.sockEnter password: ERROR 2003 (HY000): Can't connect to MySQL server on '172.29.141.112' (113) 二.问题的分析 出现上述问题,可能有以下几种可能 1. my.cnf 配置文件中 skip-networking 被配置 skip

[MYSQL] 使用 mysql-5.6.10-win32 (MySQL 5.6纯净版 ) 出现ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

win : window 10 mysql : mysql-5.6.10-win32 (MySQL 5.6纯净版 ) download From : Qt开源社区 http://www.qter.org/portal.php?mod=view&aid=10  ( https://pan.baidu.com/s/1boJQvJh ) 使用 mysql-5.6.10-win32 (MySQL 5.6纯净版 ) 出现ERROR 2003 (HY000): Can't connect to MySQL