Меню Затваряне

MySQL show status – show open database connections

MySQL „show status“ FAQ: Can you demonstrate how to use the MySQL show statuscommand to show MySQL variables and status information, such as the number of open MySQL connections?

I don’t have a whole lot of time today to give this a detailed discussion, but here is a quick look at some MySQL work that I did recently to show MySQL open database connections.

MySQL show status – Open database connections

You can show MySQL open database connections (and other MySQL database parameters) using the MySQL show status command, like this:

All those rows and values that are printed out correspond to MySQL variables that you can look at. Notice that I use like 'Conn%'in the first example to show variables that look like „Connection“, then got a little wiser in my second MySQL show status query.

MySQL show processlist

Here’s what my MySQL processlist looks like when I had my Java application actively running under Tomcat:

And here’s what it looked like after I shut Tomcat down:
As a final note, you can also look at some MySQL variables using the mysqladmin command at the Unix/Linux command line, like this:

Вашият коментар