linux下设置MySQL5.6最大连接数不生效
在linux centos6.5 中通过修改mysql的my.cnf配置文件来设置最大连接数,但是无论怎么改,mysql的连接数最多就是214个,再多了就不变了,但是通过 set global max_connections=1000则可以修改成功,不知道为什么,求教。
my.cnf内容如下:
[mysqld]
lower_case_table_names=1
character-set-server=utf8
max_connections=490
tmp_table_size = 268435456
max_heap_table_size =134217728
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# These are commonly set, remove the # and set as required.
basedir =/data/mysql
datadir =/data/mysql/data
# port = .....
# server_id = .....
# socket = .....
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
sql_mode=NO_ENGINE_SUBSTITUTION
my.cnf内容如下:
[mysqld]
lower_case_table_names=1
character-set-server=utf8
max_connections=490
tmp_table_size = 268435456
max_heap_table_size =134217728
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# These are commonly set, remove the # and set as required.
basedir =/data/mysql
datadir =/data/mysql/data
# port = .....
# server_id = .....
# socket = .....
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
sql_mode=NO_ENGINE_SUBSTITUTION
...全文
相关推荐
mysql修改最大连接数等优化mysql
linux下mysql修改最大连接数、线程缓存数等优化mysql,减少mysql创建数
修改MYSQL最大连接数的3种方法
详细介绍了如何修改MYSQL最大连接数的3种方法。
mysql最大连接数设置技巧总结
方法一:命令行修改 我们只需要打开mysql的控制台,输入“set GLOBAL max_connections=1000;”语句,就可直接设置最大连接数,如下图所示: 注:这种方法标不治本,只能暂时的修改最大连接数,一点重启mysql,最大连接数又会变回原先设置的值。 方法二:通过mysql配置文件来修改最大连接数 1、电脑上打开mysql安装目录,找到my.ini文件,如下图所示: 2、用记事本的方式打开my.ini文件,查找并修改“max_connections”的值,默认最大连接数是100,如下图所示: 设置“max_connections=1000”,这样就可设置mysql的
修改MYSQL最大连接数的3种方法分享
MYSQL数据库安装完成后,默认最大连接数是100,一般流量稍微大一点的论坛或网站这个连接数是远远不够的,增加默认MYSQL连接数的方法有好几个,这里简单分享下
ubuntu下设置mysql自动备份的例子
ubuntu下设置mysql自动备份的例子,供大家学习参考


疑难问题
