最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

mysql"toomanyconnections"错误之mysql解决方法

来源:动视网 责编:小采 时间:2020-11-09 09:37:49
文档

mysql"toomanyconnections"错误之mysql解决方法

mysql"toomanyconnections"错误之mysql解决方法:解决方法是修改/etc/mysql/my.cnf,添加以下一行 解决方法是修改/etc/mysql/my.cnf,添加以下一行: set-variable = max_connections=500 或在启动命令中加上参数 max_connections=500 就是修改最大连接数,然后重启mysql.默认的连接数是1
推荐度:
导读mysql"toomanyconnections"错误之mysql解决方法:解决方法是修改/etc/mysql/my.cnf,添加以下一行 解决方法是修改/etc/mysql/my.cnf,添加以下一行: set-variable = max_connections=500 或在启动命令中加上参数 max_connections=500 就是修改最大连接数,然后重启mysql.默认的连接数是1


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

解决方法是修改/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"toomanyconnections"错误之mysql解决方法

mysql"toomanyconnections"错误之mysql解决方法:解决方法是修改/etc/mysql/my.cnf,添加以下一行 解决方法是修改/etc/mysql/my.cnf,添加以下一行: set-variable = max_connections=500 或在启动命令中加上参数 max_connections=500 就是修改最大连接数,然后重启mysql.默认的连接数是1
推荐度:
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top