无法在窗口7的localhost(10061)上连接到MySQL服务器 [英] Can't connect to MySQL server on localhost (10061) on window 7

查看:198
本文介绍了无法在窗口7的localhost(10061)上连接到MySQL服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将Windows 7作为生产机器中的操作系统,在其中我试图使用MySQL Server 5.0作为数据库.但是我无法在生产机器上配置MySQL.以下是我收到的错误.

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. But i am unable to configure MySQL on my production machine. 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:

错误编号. 2003年
无法连接到本地主机(10061)上的MySQL服务器.

Error no. 2003
Can't connect to MySQL server on localhost (10061).

该消息还提示您需要打开TCP 3306端口来解决此问题,我对其进行了检查,发现TCP 3306端口已打开并且状态处于侦听状态.

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.

这是我的'netstat -an'命令结果-

This is my 'netstat -an' command result -

原始 本地地址外部地址状态
TCP    0.0.0.0:3306    0.0.0.0:0        聆听

Proto   LocalAddress   ForeignAddress   State
TCP     0.0.0.0:3306      0.0.0.0:0           LISTENING

这意味着3306处的TCP已打开.谁能告诉我这个问题的解决方案.但是我能够在窗口xp中安装和配置相同的MySQL Server安装程序.我也尝试了Google,发现了很多博客,但没有用.

It means TCP at 3306 is open. 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. I tried google as well and found a lot of blogs but none is of use.

非常感谢.

推荐答案

更改

 host: localhost

 host: 127.0.0.1

这很可能是由于您解析数据库的方式引起的.

This is likely caused by the way your database is being resolved.

这篇关于无法在窗口7的localhost(10061)上连接到MySQL服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆