MySQL连接错误:Can't connect to MySQL server on'localhost' (10055)

在Windows服务器上确认服务器和mysql都是正常运行,但就是连接不上。搜了一下别人的解决方案,

参考这篇https://blog.csdn.net/langren697/article/details/38422055的说法,问题就出在动态连接数上。给出的解决方案是在注册表自定义最大连接数:

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters
Value Name: MaxUserPort
Value Type: DWORD
Value data: 65534(十进制)

可以正常运行了。

原文地址:https://www.cnblogs.com/hanzg/p/11380967.html