Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The documentation does not specify if max_connections apply only to TCP connections.

The way it is said, it looks like it does apply for any kind of connection, but I'd like to be sure because otherwise, I could use it when the "Too many connection" problem arises, even if the (last) SUPER connection slot is already in use.

share|improve this question
up vote 6 down vote accepted

This limit applies to the total TCP socket connections and Unix socket connections, combined, so connecting via the Unix socket won't help you if your connection count reaches the configured max.

However, the slot reserved for a user with SUPER privilege is not a single slot in the way your question implies. Any time the server's current client thread count is equal to the value of max_connections, one more user with the SUPER privilege will be allowed to connect, regardless of how many SUPER connections are currently already established.

So the max+1 allowance refers not to a single slot that can be occupied and whose occupancy is remembered, but rather to an exception in the code that bypasses the logic that denies new connections connections when current == max and new attempt comes from a user with super, each time that condition is encountered.

This is one good reason, among others, that your application should never use an account with SUPER.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.