MySql服务配置命令
show global status like 'Max_used_connections';
mysql> show global status like 'Max_used_connections'; +----------------------+-------+ | Variable_name | Value | +----------------------+-------+ | Max_used_connections | 51 | +----------------------+-------+ 1 row in set (0.00 sec) mysql>
set global max_connections=512;
show variables like "max_connections";
mysql> set global max_connections=512; Query OK, 0 rows affected (0.00 sec) mysql> show variables like "max_connections"; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_connections | 512 | +-----------------+-------+ 1 row in set (0.00 sec) mysql>
set global interactive_timeout=60;
show global variables like "interactive_timeout";
mysql> set global interactive_timeout=60; Query OK, 0 rows affected (0.00 sec) mysql> show global variables like "interactive_timeout"; +---------------------+-------+ | Variable_name | Value | +---------------------+-------+ | interactive_timeout | 60 | +---------------------+-------+ 1 row in set (0.00 sec) mysql>
set global wait_timeout=180;
show global variables like "wait_timeout";
mysql> set global wait_timeout=180; Query OK, 0 rows affected (0.00 sec) mysql> show global variables like "wait_timeout"; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | wait_timeout | 180 | +---------------+-------+ 1 row in set (0.00 sec) mysql>
show processlist;