Mysql 错误too many connections解决方案


本文整理自网络,侵删。

Mysql 错误提示too many connections,最近遇到这个错误,经过上网查资料解决了,这里记录下,帮助有需要的朋友,

解决方法是修改/etc/mysql/my.cnf,添加以下一行:

set-variable = max_connections=500

或在启动命令中加上参数 max_connections=500

就是修改最大连接数,然后重启mysql.默认的连接数是100,太少了,所以容易出现如题错误.

以下是mysql.com网站的相关说明:

If you get a Too many connections error when you try to connect to the mysqld server, this means that all available connections are in use by other clients.

The number of connections allowed is controlled by the max_connections system variable. Its default value is 100. If you need to support more connections, you should restart mysqld with a larger value for this variable.

mysqld actually allows max_connections+1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege. By granting the SUPER privilege to administrators and not to normal users (who should not need it), an administrator can connect to the server and use SHOW PROCESSLIST to diagnose problems even if the maximum number of unprivileged clients are connected. See Section 13.5.4.19, “SHOW PROCESSLIST Syntax”.

The maximum number of connections MySQL can support depends on the quality of the thread library on a given platform. Linux or Solaris should be able to support 500-1000 simultaneous connections, depending on how much RAM you have and what your clients are doing. Static Linux binaries provided by MySQL AB can support up to 4000 connections.

1.可能是mysql的max connections设置的问题

阅读剩余部分

相关阅读 >>

链接mysql时2003错误怎么办

如何解决mysql错误1054modify

mysql中min()和least()的区别

记录mysql开发规范

mysql必知必会》怎么样

mysql数据库update语句使用详解

mysql中一个表可以有几个唯一索引

mysq中l建立测试父表、子表及测试用例归纳总结

mysql如何删除多个表格数据库数据

wdcp面板如何升级mysql版本为5.6

更多相关阅读请进入《mysql》频道 >>


数据库系统概念 第6版
书籍

数据库系统概念 第6版

机械工业出版社

本书主要讲述了数据模型、基于对象的数据库和XML、数据存储和查询、事务管理、体系结构等方面的内容。



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...