mysql 解决 ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

在使用mysql 时  有时会登录遇到错误  ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)


以下方法几步解决问题, 让mysql恢复如初(不会删除原有表和数据):

1.找到mysql安装目录,以我的为例:D:\Program Files\MySQL\MySQL Server 5.0\bin  ,在bin 目录下找到  MySQLInstanceConfig.exe,运行它

mysql 解决 ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)_第1张图片

2.点击Reconfigure Instance, 然后一路Next至此处:

mysql 解决 ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)_第2张图片

(以下同安装时的情况)点击第3个框,选择gbk。

3.如下图:

mysql 解决 ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)_第3张图片

4.填写新密码:

mysql 解决 ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)_第4张图片

6.点击execute  大功完成!

mysql 解决 ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)_第5张图片

7. 重新进入mysql:


mysql 解决 ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)_第6张图片

你可能感兴趣的:(mysql)