# Block user connections

**URL:** <https://forums.percona.com/t/block-user-connections/239>\
**Category:** Other MySQL® Questions\
**Created:** [March 13, 2007, 3:08am UTC](https://forums.percona.com/t/block-user-connections/239 "2007-03-13T03:08:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![geelwortel](https://avatars.discourse-cdn.com/v4/letter/g/5f9b8f/32.png) [@geelwortel](https://forums.percona.com/u/geelwortel)\
**Post date:** [March 13, 2007, 3:08am UTC](https://forums.percona.com/t/block-user-connections/239/1 "2007-03-13T03:08:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![linuxrunner](https://avatars.discourse-cdn.com/v4/letter/l/71c47a/32.png) [@linuxrunner](https://forums.percona.com/u/linuxrunner)\
**Post date:** [May 3, 2007, 1:33pm UTC](https://forums.percona.com/t/block-user-connections/239/2 "2007-05-03T13:33:10Z")

</div>

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.
