show variables like'%log%';
SHOW FULL PROCESSLIST;
SHOW VARIABLES LIKE'%max_connections%';
SHOW STATUS LIKE'%Connection%';
show status like'Threads%';
mysql> show status like'Threads%';
+-------------------+-------+
| Variable_name | Value |
+-------------------+-------+
| Threads_cached | 58 |
| Threads_connected | 57 | ###This value refers to the number of open connections
| Threads_created | 3676 |
| Threads_running | 4 | ###This value refers to the number of active connections, this value is generally much lower than the connected
+-------------------+-------+
Threads_connected is the same as show processlist, indicating the current number of connections. To be precise, Threads_running represents the current concurrent number
This is the maximum number of connections currently set to query the database
mysql> show variables like'%max_connections%';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 1000 |
+-----------------+-------+
You can set the maximum number of database connections in /etc/my.cnf
[mysqld]
max_connections = 1000
Command: show processlist;
If it is a root account, you can see the current connections of all users. If it is another ordinary account, you can only see the connections you occupy.
show processlist; only list the first 100, if you want to list all, please use show full processlist;
MySQL> show processlist;
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.