我对PDO与MySQL的连接存在令人困惑的问题。用PHP编写的Web应用程序生成该错误:
exception 'PropelException' with message 'Unable to open PDO connection [wrapped: SQLSTATE[HY000] [2003] Can't connect to MySQL server on '192.168.xxx.xxx' (4)]' in ./lib/symfony/plugins/sfPropelPlugin/lib/vendor/propel/Propel.php:610
令人困惑,因为未达到max_connections限制:
MAX CONNECTIONS
Current max_connections = 1000
Current threads_connected = 8
Historic max_used_connections = 783
The number of used connections is 78% of the configured maximum.
Your max_connections variable seems to be fine.
同时,当我收到此错误时,其他webaplication(无推进)或命令行工具可以很好地连接到MySQL。
其他详情:
答案 0 :(得分:1)
要解决此问题,您必须谷歌查看原始错误消息(“[2003]无法连接到MySQL服务器”),然后验证所有连接凭据。