Home >Database >Mysql Tutorial >Can't connect to MySQL server on 'localhost' (10061)解决_MySQL

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

WBOY
WBOYOriginal
2016-06-01 13:31:171112browse

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
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn