To run a command with an administrator user:
Mysql> Show [full] processlist; # full is optional, and if not added, only the first 100 results are displayed by default.
You can rely on this result to analyze some information such as user connection status. For example, I used navicat to connect with the company's remote database server, the following error occurred:
Lost connection to MySQL server @ ' Waiting for initial communication packet ', System error:0
after looking at the data, it is found that when you connect to MySQL by IP address, MySQL defaults to the address to resolve the visitor's host name. If a service such as DNS is not configured, it will time out in the process of ongoing attempts to parse, causing the error above. The simple solution is to add a visitor's ip<> hostname mapping to the MySQL server's/etc/hosts, so that the host name can be parsed correctly and the database connection completed.
Just my company's intranet environment is complex, in the absence of network management personnel assistance, it is difficult to locate the final IP access. you can then go through show [full] processlist; Real-time tracking threads parse out the correct IP address.
View MySQL thread run condition