Find the process connected to mysql under Linux

  
        

When I encounter a mysql card and then want to know why I found it, I usually use the following methods to find the problem

show processlist\\G; or show full processlist\\G;

** ************************* 5. row ********************** *****

Id: 197343

User: root

Host: 127.0.0.1:41354

db: xxx

Command: Query

Time: 0

State: Sleep

Info: show process list

After getting the port, you can check the port access status.

# netstat -anp

Copyright © Windows knowledge All Rights Reserved