Not the answer you need?
Register and ask your own question!

Block user connections

geelwortelgeelwortel ContributorInactive User Role Advisor
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



  • linuxrunnerlinuxrunner Contributor Inactive User Role Advisor
    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.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.