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
Release: 2016-06-01 13:31:17
Original
1112 people have browsed it

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  
Copy after login

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

[html] bind-address = 127.0.0.1 
Copy after login

 

重启mysql

 

bitsCN.com
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template