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

2015-02-03 03:58:49 · 作者: · 浏览: 6
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
?