Is it possible to get the number of connections to a particular database?

Is it possible to get the number of connections to a particular database?

am 30.03.2006 05:46:07 von sooseong.ng

Is it possible to determine number of connections to a particular
database in MySQL? If yes..can anyone show me the way to do it in DML
or normal query form?
? Thanks for replying and helping out!!!

Re: Is it possible to get the number of connections to a particulardatabase?

am 30.03.2006 06:58:26 von Bill Karwin

sooseong.ng@gmail.com wrote:
> Is it possible to determine number of connections to a particular
> database in MySQL? If yes..can anyone show me the way to do it in DML
> or normal query form?
> ? Thanks for replying and helping out!!!

You can get this information with the "SHOW PROCESSLIST" statement. Or
at the command-line with "mysqladmin processlist".

There doesn't seem to be any syntax for limiting the output to a
specific database, but one of the columns returned is the database name,
so you can do some filtering yourself (e.g. with grep).

See http://dev.mysql.com/doc/refman/5.0/en/show-processlist.html

Regards,
Bill K.