首页 >

mysql “too many connections” 错误 之 mysql解决方法

数据库|mysql教程mysql
mysql,too,many,connections
数据库-mysql教程
企业 静态源码,vscode中乱码,ubuntu lxd,tomcat时间不对,sqlite数据库进入,wordpress内存缓存无插件,基于vue前端框架的研究,小爬虫的故事如何读,php防注入函数,SEM SEO的内涵,qq空间网站钓鱼源码怎么用,css网页动画,phpcmsv9模板制作教程lzw
解决方法是修改/etc/mysql/my.cnf,添加以下一行
虚拟币交易手机网站源码,vscode f1,ubuntu 查找内存,Tomcat部署数据乱码,sqlite3数据库文件空,爬虫大海,百度贴吧 php,长沙seo数据分析,物流网站程序,查看织梦模板lzw
html5 demo源码下载,vscode缩小字体快捷键,ubuntu上网本,tomcat服务器破解,爬虫搜商品,php 自然语言处理,seo关键词快速排哪家好lzw
解决方法是修改/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.


mysql
  • MySQL数据库报错:Too many connections的解决办法
  • MySQL数据库报错:Too many connections的解决办法 | MySQL数据库报错:Too many connections的解决办法 ...

    mysql
  • 在SQL中设置允许同时连接的用户数【MySQL】
  • 在SQL中设置允许同时连接的用户数【MySQL】 | 在SQL中设置允许同时连接的用户数【MySQL】 ...

    mysql
  • mysql出现too many connections错误提示
  • mysql出现too many connections错误提示 | mysql出现too many connections错误提示 ...