• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase
您的位置:首页 > 数据库 >Mysql > mysql "too many connections" 错误 之 mysql解决方法

mysql "too many connections" 错误 之 mysql解决方法

作者:匿名 字体:[增加 减小] 来源:互联网 时间:2018-12-05

匿名通过本文主要向大家介绍了mysql,too,many,connections等相关知识,希望本文的分享对您有所帮助

解决方法是修改/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.
分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • 分享下mysql各个主要版本之间的差异
  • MySQL essential版本和普通版本有什么区别?
  • redhat 5.4下安装MYSQL全过程
  • 如何用SQL命令查看Mysql数据库大小
  • 解析mysql中如何获得数据库的大小
  • 解析mysql修改为utf8后仍然有乱码的问题
  • 5个常用的MySQL数据库管理工具详细介绍
  • 解析在MySQL里创建外键时ERROR 1005的解决办法
  • 解析远程连接管理其他机器上的MYSQL数据库
  • mysql 精简过程(删除一些文件)

相关文章

  • 2018-12-05优化定位较低sql的两种方式详解
  • 2018-12-05详解MySql登陆密码忘记及忘记密码的解决方法(图)
  • 2017-09-17mysql-cluster 使用介绍
  • 2018-12-05Visual Studio操作MySQL的详细步骤
  • 2017-05-11Mysql 导入导出csv 中文乱码问题的解决方法
  • 2017-05-11MySQL主从同步原理介绍
  • 2018-12-05mysql中Load Data记录换行问题的解决方法
  • 2018-12-05分享整理的12条sql语句连同数据
  • 2017-05-11mysql error:#1062 Duplicate entry ‘***′ for key 1问题解决方法
  • 2017-05-11解析mysql数据库还原错误:(mysql Error Code: 1005 errno 121)

文章分类

  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase

最近更新的内容

    • 教你怎么修改mysql默认最大连接数
    • mysql手动删除BINLOG的方法
    • MySQL无法启动的解决办法示例分享
    • SQL Server 复制需要有实际的服务器名称才能连接到服务器
    • 比较全面的MySQL优化参考
    • 总结关于mysql数据分组用法总结
    • mysql备份还原库命令方法解析(长文)
    • Excel数据导入Mysql数据库的实现方法
    • 解决远程连接mysql很慢的方法(mysql_connect 打开连接慢)
    • MySQL中常用的命令分享

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有