View connections threads in mysql SHOW PROCESSLIST
If you want to view active connections to MySQL database server then you can use SHOW PROCESSLIST command. It will return a table with information related to each connection to mysql server. If you have privillege then you can view all the connections other wise it will only show your own processes.
SHOW PROCESSLIST :
Result from above query

ID : A unique session identification number.
User : The username of the user connected or performing the action.
Host : The host name of the user issuing the statement, if its a system user performing any task this field will be blank or NULL.
db : This is the default database user is performing the action in, if selected other wise it will be blank or NULL.
Command : It shows what this thread is doing. I will explain possible values some other time.
Time : The time in seconds, the thread is been in current state.
State : The current status of thread, it is usually null if the thread stays the same for long period of time then its a sign that some thing is wrong.
Info : This column show the innermost statement thread is executing. This column only shows the first 100 characters. To view complete statements then you can use FULL in the SHOW PROCESSLIST command.
SHOW FULL PROCESSLIST;
Advertisements
MySQL HOSTING
MySQL hosting provider, clustering and replication supported. DBA Services Included.
SQL SERVER HOSTING
Reliable, powerful SQL Server 2008 hosting with ASP.NET on Windows 2008 Servers.
SQL Server DBA
I am a
SQL Server DBA with almost 9 years of experience in database
technologies.
I am again in process of redesigning this website using ASP.NET 2.0 and AJAX. The main purpose
of new SQL DBA website is to offer more features and make it easy for
me to update contents on regular basis.