【发布时间】:2012-06-09 04:45:22
【问题描述】:
我在 Windows 7 上使用 mysql-installer-5.5.20.0.msi 安装了 MySQL。 在 cmd 窗口中,我运行“mysqlshow -u root -p”。它要求输入密码,然后返回此错误:“无法连接到 'localhost' (10061) 上的 MySQL 服务器”这是部分失败/成功安装的不良指示。
阅读页面http://dev.mysql.com/doc/refman/5.5/en/windows-troubleshooting.html 后,它告诉我在 C:\Program Files\MySQL\MySQL Server 5.5\data 中找到错误日志 (.err)。目录存在但没有日志文件。
我感觉这与 Windows 7 的严格安全性有关,尤其是在安装基于 Unix 的软件时。是的,我是我电脑上的管理员。
感谢任何帮助或建议。而且我可以通过回答 Java 和 SQL 查询问题来报答你。
【问题讨论】:
-
这听起来更像是您在尝试连接时提供了无效的用户名/密码。
-
好吧,root 作为用户名是由安装提供的,因此应该是有效的。而且我没有设置root密码,至少现在还没有,为了方便使用。
-
您确定 MySQL 服务器进程确实在运行?
-
来自文档:
(10061) indicates that the network connection has been refused. You should check that there is a MySQL server running, that it has network connections enabled, and that the network port you specified is the one configured on the server。 -
您应该尝试在serverfault.com/faq 或superuser.com/faq 中提出此类问题