简体   繁体   English

无法连接到 window 7 上 localhost (10061) 上的 MySQL 服务器

[英]Can't connect to MySQL server on localhost (10061) on window 7

I am having window 7 as a operating system in the production machine where i am trying to use MySQL server 5.0 as a database.我在生产机器中使用 window 7 作为操作系统,我正在尝试使用 MySQL 服务器 5.0 作为数据库。 But i am unable to configure MySQL on my production machine.但我无法在我的生产机器上配置 MySQL。 Following is the error i am receiving.以下是我收到的错误。

The security setting could not be applied to the database because the connection has failed with the following error:无法将安全设置应用于数据库,因为连接失败并出现以下错误:

Error no.错误编号2003 2003年
Can't connect to MySQL server on localhost (10061).无法连接到 localhost (10061) 上的 MySQL 服务器。

The message also prompts that you need to open TCP 3306 port to resolve this issue, i checked it and found that TCP 3306 port is already opened and state is listening.消息还提示需要打开TCP 3306端口来解决这个问题,我查了一下发现TCP 3306端口已经打开,Z9ED39E2EA931586B6A985A6942EF57E正在监听。

This is my 'netstat -an' command result -这是我的“netstat -an”命令结果 -

Proto LocalAddress ForeignAddress State原型 LocalAddress ForeignAddress State
TCP 0.0.0.0:3306 0.0.0.0:0 LISTENING TCP 0.0.0.0:3306 0.0.0.0:0 聆听

It means TCP at 3306 is open.这意味着 3306 处的 TCP 已打开。 Can anyone please tell me the solution of this problem.谁能告诉我这个问题的解决方案。 However i am able to install and configure the same MySQL Server setup in window xp.但是我能够在 window xp 中安装和配置相同的 MySQL 服务器设置。 I tried google as well and found a lot of blogs but none is of use.我也尝试了谷歌,发现了很多博客,但没有一个有用。

Thanks a lot.非常感谢。

Change改变

 host: localhost

to

 host: 127.0.0.1

This is likely caused by the way your database is being resolved.这很可能是由您的数据库的解析方式引起的。

First check in the system, MySQL services is in running condition or not.首先检查系统,MySQL 服务是否处于运行状态。 look out on path of services go to right click on My Computer > manage > Services and Application > Services and check MySQL service status is started or not.查看服务路径 go 右键单击我的电脑 > 管理 > 服务和应用程序 > 服务并检查 MySQL 服务状态是否已启动。 Otherwise right click on service and start to service.否则右键单击服务并开始服务。

I hope this will help you.我希望这能帮到您。

I didn't find the MySQL services even after solving the problem.即使解决了问题,我也没有找到MySQL 服务
I just run the mysqld as administrator and the problem is solved.我只是以管理员身份运行mysqld ,问题就解决了。 So, simple but It took me 3 hours to find the solution.所以,很简单,但我花了 3 个小时才找到解决方案。

The problem was rsolved.问题解决了。 The MySQL was not running in the Services section of Settings. MySQL 未在“设置”的“服务”部分运行。 Because XAMMP had disconnected the already running application in the background.因为 XAMMP 在后台断开了已经在运行的应用程序。

have you checked whether the port 3036 is already in use by another application?您是否检查过端口 3036 是否已被另一个应用程序使用? Have you checked whether a telnet hostname 3036 works on the local MySQL server and also on the remote machine?您是否检查过 telnet hostname 3036 是否在本地 MySQL 服务器以及远程机器上工作?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法连接到“localhost”上的 MySQL 服务器 (10061) - Can't connect to MySQL server on 'localhost' (10061) 无法在Windows XP的localhost(10061)上连接到MySQL服务器。 连接到mysql时出错 - Can't connect to MySQL server on localhost (10061) on window XP. Error connecting to mysql MySql Workbench,无法连接到“本地主机”上的MySQL服务器(10061)(2003) - MySql Workbench, Can't connect to MySQL server on 'localhost' (10061) (2003) FreeBSD Mysql 2003 - 无法连接到“localhost”上的 MySQL 服务器 (10061) - FreeBSD Mysql 2003 - Can't connect to MySQL server on 'localhost' (10061) #2003-无法连接到“本地主机”上的MySQL服务器(10061) - #2003 - Can't connect to MySQL server on 'localhost' (10061) Scotchbox-无法连接到“本地主机”上的MySql服务器(10061) - Scotchbox - Can't connect to MySql server on 'localhost' (10061) Rails 开发 - 无法连接到“本地主机”上的 MySQL 服务器 (10061) - Rails development - Can't connect to MySQL server on 'localhost' (10061) 无法连接到“本地主机”上的 MySQL 服务器 (10061) (2003) - Can't connect to MySQL server on 'localhost' (10061) (2003) 错误2003:无法连接到“本地主机”上的MySQL服务器(10061) - error 2003: Can't connect to MySQL server on 'localhost' (10061) ODBC 3.51 驱动程序无法连接到本地主机上的 MySQL 服务器 (10061) - ODBC 3.51 Driver Can't connect to MySQL server on localhost (10061)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM