mysql报错ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

23:29:02/2017-05-03

现象描述:在Command Line Client可以登陆,但是在命令提示符cmd下登陆出错。

我最终的解决办法是:

我先去看了一下我的my.ini配置文件。

新版5.7的配置文件不是在安装目录,而是在programDat/mysql文件目录下

打开文件之后:

我在安装的时候修改了默认端口3306为8082,

在cmd登陆的时候仍然是默认端口登陆的,所以会报错。那么在登陆的 时候可以指定端口,

-P一定要大写。

mysql报错ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

时间: 2024-10-18 14:35:27

mysql报错ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)的相关文章

长久不用的mysql报错ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

mac上安装过mysql: 然而,尝试连接时报错: $ mysql -u root -p Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 尝试去查看mysql.socket文件,发现没有.. $ which mysql /usr/local/bin/mysql 然后试试重启mysql: $ mysql.server start

mac 安装mysql 报错“ERROR 2002 (HY000): Can not connect to local MySQL server through socket '/tmp/mysql.sock' (2)” 解决办法

首先安装 homebrew 再 brew install mysql 之后连接 mysql 无论是登录还是修改初始密码都会报如下的错误 ERROR 2002 (HY000): Can not connect to local MySQL server through socket '/tmp/mysql.sock' (2) 运行如下解决:参考 http://www.thinksaas.cn/group/topic/347978/ unset TMPDIR mysql_install_db --v

Mac brew 安装mysql 报错 ERROR 2002 (HY000): Can't connect to local MySQL server through socket

安装mysql 最新版 56 brew install mysql 启动报错 ben:~ soul$ which mysql /usr/local/bin/mysql ben:~ soul$ mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 解决办法 运行 ben:~ soul$ mysql.server start Starting MySQL .

[转]MySQL远程连接ERROR 2003 (HY000):Can't connect to MySQL server on'XXXXX'(111) 的问题

装了个navicat ,然后去连接mysql服务器,一直连不上,一开始以为是防火墙问题,后来防火墙都关闭, iptable服务关闭,还是不行,网上查了下:主要是因为设置了bind_address=127.0.0.1 原文引用: 问题描述: 从一台linux远程连接另一台linux上的MySQL, 出现ERROR 2003 (HY000): Can't connect to MySQL server on 'xxx.xxx.xxx.85'(111)错误. [mysql@vvmvcs0 ~]$ my

ERROR 2003 (HY000): Can't connect to MySQL server on 'ip'(111)

问题描述:  从一台linux远程连接另一台linux上的MySQL, 出现ERROR 2003 (HY000): Can't connect to MySQL server on 'ip'(111)错误.   [[email protected] ~]$ mysql -hxxx.xxx.xxx.85 -uroot -p Enter password:  123456   ERROR 2003 (HY000): Can't connect to MySQL server on 'xxx.xxx.

MySQL远程连接出现ERROR 2003 (HY000):Can't connect to MySQL server on'XXXXX'的问题

MySQL远程连接ERROR 2003 (HY000):Can't connect to MySQL server on'XXXXX'的问题 问题描述: 从一台linux远程连接另一台linux上的MySQL, 出现ERROR 2003 (HY000): Can't connect to MySQL server on 'xxx.xxx.xxx.85'(111)错误. [[email protected] ~]$ mysql -hxxx.xxx.xxx.85 -uroot -p Enter pa

ERROR 2003 (HY000): Can't connect to MySQL server on '10.16.115.101' (111)

ubuntu安装完mysql,使用apt-get命令安装的,默认是只允许本地访问的 [email protected]:~/software# mysql -uroot -p123456 -h10.16.115.101 -P3306 ERROR 2003 (HY000): Can't connect to MySQL server on '10.16.115.101' (111) 默认配置文件: 需要把bind-address注释掉 重启mysql服务 [email protected]:~/s

Linux中mysql进入命令行报错:MYSQL ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.99.192' (111)

场景:在Linux中安装mysql01和mysql02,通过VIP虚出一个VIP=192.168.99.192,mysql01为主ip为192.168.99.153,mysql02为备机ip为192.168.99.154 此时VIP在mysql01上通过 mysql01上连接VIP :mysql -h 192.168.99.192 -P 3306   结果是可以正常进入mysql命令行: 通过mysql02上远程连接VIP 会在界面上报错:mysql error 2003(HY000):Can'

MySQL登录报错ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

[[email protected] mysql3307]# /opt/mysql3307/bin/mysql -upisp [email protected]123 mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.so