MySQL 查看最大连接数, 当期连接数.

时间:2023-12-03 12:16:56

查看最大连接数

  select VARIABLE_VALUE from information_schema.GLOBAL_VARIABLES where VARIABLE_NAME='MAX_CONNECTIONS';

或者

  show variables like '%max_connections%';

查看当前连接数明细
  show processlist;

MySQL 查看最大连接数, 当期连接数.

设置最大连接数(一次性,重启mysql后还原)

  set global max_connections=200。

show status like 'Threads%';

MySQL 查看最大连接数, 当期连接数.