duanju7199 2016-07-28 22:49
浏览 1190

ERROR 2003(HY000):无法连接到'localhost'上的MySQL服务器(10061“未知错误”)

This may be a duplicate question, however I searched internet for a while, and still couldn't find the solution.

I installed xampp on windows 7. The mysql is running on a random port. However, I can't access mysql from command line. I keep getting this error message:

ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061 "Unknown error").

I enabled mysql for windows services as administrator, and opened the port that the mysql is using through windows firewall settings. But the problem is still not fixed, and I still can not see the port from http://canyouseeme.org/.

  • 写回答

3条回答 默认 最新

  • douwen3198 2016-07-28 22:56
    关注

    Open a command line with administrative privileges. Type the command below.

    netstat -a -p tcp | findstr ":138"
    

    Give it the port number that your sql is using instead of ":138" in the above example. Check if the output contains 0.0.0.0 as the IP or not. If it contains your local area network IP then use that IP to connect. Perhaps MySQL is not using all IPs to listen for connections.

    评论

报告相同问题?

悬赏问题

  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致