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
I reinstalled VMware and Ubuntu, but the command ...
prune To use this command, both the client and da...
This article records the installation and configu...
Table of contents 1. context 1. Usage scenarios 2...
need: The backend returns an array object, which ...
1. Introduction WHMCS provides an all-in-one solu...
MySQL's index types include normal index, uni...
MySql index detailed introduction and correct use...
Anyone who has studied or used HTML should be fam...
The downloaded version is the Zip decompression v...
In Linux system, both chmod and chown commands ca...
What is content overflow? In fact, when there is ...
Table of contents 1. Introduction to teleport 1.1...
MySQL UTF-8 encoding MySQL has supported UTF-8 si...
Table of contents Overview 1. Develop the require...