无法使mysqldump连接到本地mysql实例(错误2003/10061) [英] Can't get mysqldump to connect to local mysql instance (error 2003 / 10061)

查看:519
本文介绍了无法使mysqldump连接到本地mysql实例(错误2003/10061)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows XP机器上安装了MySQL 5.1.它正在侦听端口3308.我正在尝试使用mysqldump:

I've got mysql 5.1 on a windows xp machine. It's listening on port 3308. I'm trying to use mysqldump:

> mysqldump -u root -pmypassword dbname > out.sql

遇到错误:

mysqldump: Got error: 2003: Can't connect to MySQL server on 'localhost' (10061) when trying to connect

不确定是什么问题,请看--help转储变量,并显示我在mysql安装中设置的port = 3308(而不是默认的3306).我认为我的安装没有什么不同.我还尝试在命令行上显式设置端口号,但仍然是相同的错误.

Not sure what the problem is, looking at --help dumps variables and shows port=3308 as I set in the mysql installation (instead of default 3306). I don't think there's anything different with my installation. I also tried explicitly setting the port # on the command line but still same error.

谢谢

推荐答案

要通过端口(而不是默认的3306)进行连接,请使用:

To connect through a port (and not the default 3306), use:

mysqldump -u root -pmypassword -P 3308 dbname > out.sql

除此之外,查看MySQL是否在端口3308响应的简单测试是尝试telneting:

Besides that, a simple test to see if MySQL responds at port 3308 is to try telneting:

telnet 127.0.0.1 3308

如果MySQL正在侦听端口3308,它将以错误响应并运行版本.

If MySQL is listening on port 3308, it'll respond with an error and the version running.

这篇关于无法使mysqldump连接到本地mysql实例(错误2003/10061)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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