查看当前连接情况
mysql> show variables like '%connections%';
+----------------------+-------+
| Variable_name | Value |
+----------------------+-------+
| max_connections | 500 |
| max_user_connections | 0 |
+----------------------+-------+
2 rows in set (0.01 sec)
查看用户连接情况
mysql> select * from performance_schema.users;
+------+---------------------+-------------------+
| USER | CURRENT_CONNECTIONS | TOTAL_CONNECTIONS |
+------+---------------------+-------------------+
| NULL | 28 | 636237 |
| tony | 2 | 5071859 |
| root | 1 | 44 |
+------+---------------------+-------------------+
3 rows in set (0.00 sec)
修改最大连接数
mysql> set global max_connections=1000;
Query OK, 0 rows affected (0.00 sec)
留言