mysql - 查询连接
mysql 查询客户端连接信息
select * from information_schema.processlist where db='t_user' and host like '172.%';
mysql 最大连接数
mysql 8.x 默认最大连接数为 500 :
mysql> show variables like '%connection%';
+--------------------------+-----------------+
| Variable_name | Value |
+--------------------------+-----------------+
| character_set_connection | utf8 |
| collation_connection | utf8_general_ci |
| max_connections | 500 |
| max_user_connections | 0 |
| mysqlx_max_connections | 100 |
+--------------------------+-----------------+
5 rows in set
mysql 5.7, 5.6 默认最大连接数为 151:
mysql> show variables like '%connection%';
+--------------------------+-----------------+
| Variable_name | Value |
+--------------------------+-----------------+
| character_set_connection | utf8 |
| collation_connection | utf8_general_ci |
| max_connections | 151 |
| max_user_connections | 0 |
+--------------------------+-----------------+
4 rows in set