MYSQL - 无法连接到“localhost”上的 MYSQL 服务器 (10061)

发布于 2024-07-10 06:58:11 字数 159 浏览 4 评论 0原文

我已经在我的电脑上安装了 wamp 服务器(它没有互联网或内联网连接,Windows XP -操作系统)。 但是当我访问MYSQL时会弹出这个错误。 你能告诉我如何解决这个错误吗? 非常感谢。

无法连接到“localhost”上的 MYSQL 服务器 (10061)

Ive install wamp server on my PC(it has no internet or intranet connection, Windows XP -OS).
But when I access MYSQL this error popup.
Can you give any idea on how can i resolve this error.
thank you very much.

Cant connect to MYSQL server on 'localhost' (10061)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

长不大的小祸害 2024-07-17 06:58:11

从命令行(开始/运行/键入 cmd,按确定),键入:

telnet localhost 3306

如果 MySQL 正在运行,您将看到 mysql 版本(和一些垃圾)。

要查看服务是否正在运行,请键入:

sc query mysql

如果它正在运行,您将看到类似以下内容:

SERVICE_NAME: mysql
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE,PAUSABLE,ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

from the commandline (start/run/ type cmd, press ok), type:

telnet localhost 3306

If MySQL is running, you'll see the mysql version (and some garbage).

To see if the service is running, type:

sc query mysql

You'll see something like this if it's running:

SERVICE_NAME: mysql
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE,PAUSABLE,ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0
蛮可爱 2024-07-17 06:58:11

要检查 MySQL 是否正在运行,只要将其安装为服务,您可以转到“开始”->“MySQL”。 控制面板-> 管理工具 -> 服务(我可能对这些路径有点偏离,我是 OS X / Linux 用户),并在该列表中查找 MySQL。 查看它是启动还是停止。

如果您确实想要的话,您可以进行端口扫描并确定该端口是否打开。 网上有各种免费工具可以扫描您的 IP,并告诉您哪些端口是开放的以及正在侦听哪些端口。

To check to see if MySQL is running, provided its installed as a service you can go to Start -> Control Panel -> Administrative Tools -> Services (i may be a bit off on those paths, I'm an OS X / Linux user), and look for MySQL on that list. See if it is started or stopped.

You can then do a portscan if you really want to and determine if that port is open. There are all kinds of free tools online that will scan your IP and tell you which ports are open and what is listening on them.

坏尐絯℡ 2024-07-17 06:58:11

除非您在安装过程中执行了某些操作,否则我相信该端口将是标准的,并且安装后该服务将不会运行。

MySQL 提供了几种用于管理服务器的 GUI 工具: http://dev.mysql.com /downloads/gui-tools/5.0.html 其中一个工具是“MySQL System Tray Monitor”,它将检测正在运行的服务,并允许您轻松停止和启动服务器。 您还可以查看“MySQL”的服务列表以查看该服务是否处于活动状态。

如果服务正在运行但您仍然无法连接,则需要确保 Windows 防火墙没有阻止对该端口的访问。 如果您的防火墙未配置为在阻止程序时通知您(检查 Windows 防火墙控制面板,它可能不会通知您已检测到该程序)。

Unless you did something during the install, I believe that the port will be standard and the service will NOT be running after install.

MySQL provides several GUI tools for managing servers: http://dev.mysql.com/downloads/gui-tools/5.0.html One of those tools is the "MySQL System Tray Monitor" which will detect the running service, and allow you to stop and start the server easily. You can also review the list of services for "MySQL" to see if that service is active.

If the service is running and you still can't connect, you need to make sure the Windows firewall is not blocking access to the port. If your firewall is not configured to notify you when it block a program (check the Windows Firewall control panel, it might not have notified you that it's detected the program).

诺曦 2024-07-17 06:58:11

确保它正在运行,检查 my.cnf 是否确实正在侦听正确的 IP ( 127.0.0.1 ),并确保您也连接到正确的端口。

尝试使用telnet进行调试,看看问题出在哪里,可能是mysql没有启动,或者监听了不同的端口。

Make sure it is running, check in my.cnf that it is really listening to the correct IP ( 127.0.0.1 ) and make sure you connect to the correct port aswell.

Try using telnet for debugging aswell and see where the problem lies, maybe mysql isnt started, or listens to a different port.

你没皮卡萌 2024-07-17 06:58:11

尝试将 mysql 端口 3300 更改为“3306”

try to change a mysql port 3300 to "3306"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文