1. View the detailed information of all current connections: ./mysqladmin -uadmin -p -h10.140.1.1 processlist2. View only the current number of connections (Threads is the number of connections): ./mysqladmin -uadmin -p -h10.140.1.1 status , View detailed information of all current connections: mysqladmin -uroot -proot processlist D:\MySQL\bin>mysqladmin -uroot -proot processlist| Id | User | Host | db | Command | Time | State | Info | | 591 | root | localhost:3544 | bbs | Sleep | 25 | | | | 701 | root | localhost:3761 | | uery | 0 | | show processlist | 2. Only view the current number of connections (Threads is the number of connections): mysqladmin -uroot -proot status D:\MySQL\bin>mysqladmin -uroot -proot status Uptime: 2102 Threads: 3 Questions: 15531 Slow queries: 0 Opens: 0 Flush tab les: 1 Open tables: 61 Queries per second avg: 7.3893, modify the maximum number of mysql connections: Open my.ini and modify max_connections=100 (the default is 100). Today, a MySQL server suddenly had a surge in connections, and all waiting processes were locked... Because of improper problem solving, I was scolded...OTL Summary: In the future, we should quickly locate errors and arrange solutions After logging in to the MySQL client, you can also use the status command to obtain the number of thread connections and the ID of the current connection. Or use Take a look at all the connection processes, pay attention to the process waiting time and whether the status is locked If there are too many processes, print out the processes and then check In addition, the method to modify the maximum number of MySQL connections: Edit MySQL (best combination with PHP) configuration file my.cnf or my.ini Add the following to the [MySQL (best combination with PHP)] configuration section: max_connections = 1000 Save and restart the MySQL (best combination with PHP) service. Then use the command: Where is the best place for abortion surgery in Wuxi? http://www.120csjlyy.com/ MySQL (best combination with PHP) After entering the password of the root database account, you can see | max_connections | 1000 | View the number of MySQL connections and the number of MySQL connections for the current user First enter the mysql prompt as an administrator. mysql> show processlist; can display the first 100 connection information, show full processlist; can display all. By the way, if you log in with a normal account, only this user's will be displayed. Note the semicolon after the command. If we want to view this server settings. This is the global limit on the number of connections. Summarize The above is a detailed explanation of how to view the current number of MySQL connections introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: When backing up files in Centos7, add the backup date to the backup file
>>: An article to understand operators in ECMAScript
It's the end of the year and there are fewer ...
1. Dynamic query rules The dynamic query rules ar...
1. Check and install pssh, yum list pssh 2. Becau...
Table of contents 1. Get a random Boolean value (...
In MySQL, you may encounter the problem of case s...
This article shares the specific code of canvas t...
After going through a lot of hardships, I searched...
This article example shares the specific code of ...
Table of contents Debounce Throttle Summarize Deb...
This article records the specific method of insta...
Before using idea to write JSP files, you need to...
1. CSS Navigation Bar (1) Function of the navigat...
1. Parent div defines pseudo-classes: after and z...
Table of contents 1. Resources and Construction 1...
introduce Monitors the health of HTTP servers in ...