Block user connections

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


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.