List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:May 2 2004 6:02pm
Subject:Re: Need to know how many current connections
View as plain text  
In the last episode (May 02), Mailing List Receiver said:
> We weekly rotate the mysqld log.  I need to find a way to query the
> server to see how many current connections with clients there are,
> so I can wait to restart the server when the number of connections
> is zero.  mysqladmin doesn't seem to have this capability.
> Is there any other way?

"SHOW STATUS LIKE 'threads_connected'" will tell you how many clients
are currently connected, but you should't need to bounce mysqld at all.
"FLUSH LOGS" will tell mysql to reopen its logfiles without restarting. 
See

http://dev.mysql.com/doc/mysql/en/Log_file_maintenance.html

-- 
	Dan Nelson
	dnelson@stripped
Thread
Need to know how many current connectionsMailing List Receiver2 May
  • Re: Need to know how many current connectionsDan Nelson2 May