php SQLSTATE[08004] [1040] 连接太多
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2229974/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
SQLSTATE[08004] [1040] Too many connections
提问by gee
I'm getting this error messages SQLSTATE[08004] [1040] Too many connections, I'm using pdo adapter. Do I need to close connection? And how I do that?
我收到此错误消息SQLSTATE[08004] [1040] Too many connections,我正在使用 pdo 适配器。我需要关闭连接吗?我怎么做?
回答by Camden S.
In your my.conf file (usually located in /etc) find the line that says:
在您的 my.conf 文件(通常位于 /etc 中)中,找到以下行:
[mysqld]
And somewhere below that set
低于该集合的某处
max_connections=500
Or whatever numeric value you need.
或者您需要的任何数值。
More information here: MySQL 5.5 Reference Manual: Too many connections.
更多信息请访问:MySQL 5.5 参考手册:连接过多。
回答by Pablo Morales
You need change your my.cnffile.
你需要改变你的my.cnf文件。
[mysqld]
set-variable=max_connections=250
Upper the value.
高于该值。
回答by egg
The root cause for this error for me was a full hard drive. Keep that in mind as a possibility.
对我来说这个错误的根本原因是一个完整的硬盘驱动器。请记住这一点。
回答by Dr akm
In your mysql my must to run this:
在你的 mysql 我必须运行这个:
Set Global max_connections=2000
I'm using phpMyAdmin and I executed
我正在使用 phpMyAdmin 并且我执行了

