您好,欢迎来到纷纭教育。
搜索
您的当前位置:首页解决MySQL错误:Toomanyconnections

解决MySQL错误:Toomanyconnections

来源:纷纭教育


连接风信网官网 http://www.ithov.com 突然出现如下错误: MySQL Error Message: Can not connect to MySQL server SQL: Error: Too many connections Errno.: 1040 Click here to seek help. 连接数超过了 MySQL 设置的值,与 max_connections 和 wait_time

连接风信网官网  突然出现如下错误:

MySQL Error
Message: Can not connect to MySQL server
SQL:
Error: Too many connections
Errno.: 1040
Click here to seek help.

连接数超过了 MySQL 设置的值,与 max_connections 和 wait_timeout 都有关系。wait_timeout 的值越大,连接的空闲等待就越长,这样就会造成当前连接数越大。

解决方法:

1、虚拟主机用户请联系空间商优化 MySQL 的配置;

2、主机用户请联系服务器管理员优化 MySQL 服务器的配置,可参考:

修改 MySQL 配置文件(Windows下为 my.ini, Linux下为 my.cnf )中的参数:

max_connections= 1000
wait_timeout = 5

如果没有可以自行添加,修改后重启 MySQL ,如果经常性的报此错误,请做一下服务器的整体优化。

Copyright © 2019- fenyunshixun.cn 版权所有 湘ICP备2023022495号-9

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务