mysql too many open connections问题解决方法
2014-05-28 00:00
411 查看
曾经以为在my.cnf写入max_connections = 2000
就可以改变mysql的最大并发量,今天查到一个命令,发现服务器的mysql最大连接数为151.
控制台,连接上mysql
这条命令可以看到所有基础配置
如果单独看max_connections可以这样
151 好像是lampp默认的最大连接数。
my.cnf里大致这样写的
改完以后
然后把max_connections=2000移动到[mysqld]下面,重启动mysql
就好了。
说明这配置必须在[mysqld]下面,才有用。
就可以改变mysql的最大并发量,今天查到一个命令,发现服务器的mysql最大连接数为151.
控制台,连接上mysql
show variables;
这条命令可以看到所有基础配置
如果单独看max_connections可以这样
show variables like 'max%'; +―――――――――-+――――+ | Variable_name | Value | +―――――――――-+――――+ | max_allowed_packet | 1048576 | | max_binlog_cache_size | 4294963200 | | max_binlog_size | 1073741824 | | max_connect_errors | 10 | | max_connections | 151 | | max_delayed_threads | 20 | | max_error_count | 64 | | max_heap_table_size | 16777216 | | max_insert_delayed_threads | 20
151 好像是lampp默认的最大连接数。
my.cnf里大致这样写的
max_connections=2000 # The MySQL server [mysqld] port = 3306 socket = /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock
改完以后
# The MySQL server [mysqld] max_connections=2000 port = 3306
然后把max_connections=2000移动到[mysqld]下面,重启动mysql
+―――――――――-+――――+ | Variable_name | Value | +―――――――――-+――――+ | max_allowed_packet | 1048576 | | max_binlog_cache_size | 4294963200 | | max_binlog_size | 1073741824 | | max_connect_errors | 10 | | max_connections | 2000 | | max_delayed_threads | 20 | | max_error_count | 64 | | max_heap_table_size | 16777216 | | max_insert_delayed_threads | 20
就好了。
说明这配置必须在[mysqld]下面,才有用。
相关文章推荐
- mysql too many open connections问题解决方法
- 解决mysql 1040错误Too many connections的方法
- 解决mysql 1040错误Too many connections的方法
- 解决mysql 1040错误Too many connections的方法
- 解决小小书屋网访问时MySQL连接问题:Too many connections
- 解决mysql 1040错误Too many connections的方法
- Too many connections:解决mysql连接数过多的问题
- Linux 下 mysql :ERROR 1040 (00000): Too many connections解决方法
- 遇到问题----linux-----linux 打开文件数 too many open files 解决方法
- mysql "too many connections" 错误 之 mysql解决方法
- 解决mysql 1040错误Too many connections的方法
- 解决mysql 1040错误Too many connections的方法
- mysql "too many connections" 错误 之 mysql解决方法
- 解决mysql错误 Too many connections的方法
- mysql5.6 too many connections问题解决及其他参数设置
- 解决mysql 1040错误Too many connections的方法
- MySQL 1040 Too many connections 问题解决
- 解决mysql 1040错误Too many connections的方法
- 遇到问题----linux-----linux 打开文件数 too many open files 解决方法
- 找到一篇比较全面的解决mysql最大连接数Too many connections问题的帖子