查看max_connections
进入MySQL,用命令:show variables
查看数据库最大可连接数的变量值:max_connections
查看threads_connected
进入MySQL,用命令:show status
查看当前活动的连接线程变量值:threads_connected
设置max_connections
设置办法是在my.cnf文件中,添加下面的最后红色的一行:
[mysqld]
port=3306
#socket=MySQL
skip-locking
set-variable = key_buffer=16K
set-variable = max_allowed_packet=1M
set-variable = thread_stack=64K
set-variable = table_cache=4
set-variable = sort_buffer=64K
set-variable = net_buffer_length=2K
set-variable = max_connections=32000
阅读(1448) | 评论(0) | 转发(0) |