1. 首页 > 网络技术

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

以前用的mysql5.0.45安装版的,用了一段时间以后重启服务器就连不上了,在服务里看还是运行着的,怎么都连不上数据库。没有办法卸载重新安装吧,可是到最后一步的时候怎么都过不去了,网上的解决方法也不行。又下了免安装版的5.1.6,第一次运行可以用,可是重启服务器又不行了,状态和安装版的一样,后来在mysql官方论坛看到了一个高手的解决办法,现提供在此以备用。

Thank you for the bug report. Sorry but this isn't bug, try the below steps:

1- Be sure using the Task manager none mysqld process is running as service.
2- Open a DOS prompt and go the install \bin directory.
3- Run the below command:

   mysqld-nt --standalone --console
4- Open another DOS prompt and go too to the \bin directory.
5- Run the below command:

   mysql -uroot -p

you will see something like below:

c:\mysql\bin>mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 18 to server version: 5.0.22

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

You need to provide a password if you during the install had configured
the root privileges or empty otherwise.

就是不用安装在服务里,直接在mysql命令后面加上参数用dos窗口运行。

就是mysqld-nt --standalone --console

本文由林心小筑发布,不代表林心小筑立场,转载联系作者并注明出处:https://www.linfly.net/wangluojishu/644.html

留言与评论(共有 0 条评论)
   
验证码:

联系我们

在线咨询:点击这里给我发消息

微信号:

工作日:9:30-18:30,节假日休息