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