首页 >数据库 >mysql教程 >Can't connect to MySQL server on 'localhost' (10061)解决_MySQL

Can't connect to MySQL server on 'localhost' (10061)解决_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原创
2016-06-01 13:31:171121浏览

bitsCN.com

Can't connect to MySQL server on 'localhost' (10061)解决方案

 

0:前言

 

mysql用SQLyog或者navicat连接不上数据库

 

重启服务器还是连不上

 

用cmd方式能够登陆mysql

 

1:解决方案

 

host文件(host文件在C:/WINDOWS/system32/drivers/etc目录下)中添加

[html] 127.0.0.1       localhost  

 

 

打开my.ini,在[mysqld]添加

 

[html] bind-address = 127.0.0.1 

 

重启mysql

 

bitsCN.com
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn