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

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

时间:2014-12-18 13:39:30      阅读:375      评论:0      收藏:0      [点我收藏+]

标签:mysql   mysql错误   连接失败   

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

root@idata1:~/software# mysql -uroot -p123456 -h10.16.115.101 -P3306
ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘10.16.115.101‘ (111)

默认配置文件:

bubuko.com,布布扣


需要把bind-address注释掉

bubuko.com,布布扣

重启mysql服务

root@idata1:~/software# service mysql restart
mysql stop/waiting
mysql start/running, process 6738

测试连接
root@idata1:~/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)

标签:mysql   mysql错误   连接失败   

原文地址:http://blog.csdn.net/u010670689/article/details/42003905

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