Home » Performance » MySQL » Block user connections
Block user connections [message #923] Tue, 13 March 2007 04:38 Go to next message
geelwortel  is currently offline geelwortel
Messages: 25
Registered: September 2006
Junior Member
Hi all

Is there a command to run that will allow all current connections to complete but will not allow new connections to be made until you make the server "available" again? Myisam server

Thanks
Andrew
Re: Block user connections [message #1193 is a reply to message #923 ] Thu, 03 May 2007 15:03 Go to previous message
linuxrunner  is currently offline linuxrunner
Messages: 15
Registered: February 2007
Location: NYC
Junior Member
You can do a "set GLOBAL MAX_CONNECTIONS=1" and when you want connections back in "set GLOBAL MAX_CONNECTIONS=500" or whatever you have set in your my.cnf for max_connections. Keep in mind that when you do this you want to be the root user or a user with the SUPER privilege because mysql will always reserve 1 extra connection over MAX_CONNECTIONS for the admin to connect.
Previous Topic:Replication setup
Next Topic:How to improve the speed of mysql query using count(*)
Goto Forum:
  


Current Time: Fri Jul 10 02:27:40 EDT 2009

Total time taken to generate the page: 0.02579 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.