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:

Leave a Reply

Вашият имейл адрес няма да бъде публикуван. Задължителните полета са отбелязани с *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">