I have set max connections to around 2000 in my.cnf file.


I have upgraded to 5.5.20 and now I see the following line in the error log.

120201 19:40:24 [Warning] Changed limits: max_open_files: 1024  max_connections: 214  table_cache: 400

Why does mysql changed the max connections value to 214 ?

# mysqladmin variables | grep max_connections
| max_connections | 214                                               

Soft and hard open files restricted by OS is 1024

# ulimit -Sa | grep "open files"
open files                      (-n) 1024

# ulimit -Ha | grep "open files"
open files                      (-n) 1024

The number of actually used max connections:

# mysql -e"show status like '%used_connections%'"
| Variable_name        | Value |
| Max_used_connections | 95     |
  • 1
    Try setting the ulimit open files higher, like 4096. ulimit -n 4096
    – Michael
    Feb 1, 2012 at 15:57
  • Has the behaviour changed? I had 5.0.77 version and I did not notice this issue. It is only when I upgraded to 5.5.20 I have the values changed!
    – shantanuo
    Feb 1, 2012 at 16:08
  • 1
    Just going to ask the obvious. Have you confirmed that the upgrade didn't change your my.cnf? Also, what OS? Was this installed by a package manager such as yum? If so, which package? Feb 1, 2012 at 19:57

3 Answers 3


It seems OK to me. You cannot have max_connections larger than that, because you open_files_limit is too low. For every connection MySQL opens several files. Take a look here.

So, you will have to increase open files limit on your OS, and afterwards, you can put higher max_connections value.


This seems to be the same problem that I answered in stackoverflow here, although I was using CentOS 7 & MySQL 5.6.26

You need to up your open files limit both for the mysql user (in limits.conf) and for the mysql service (in the mysql.service file)

append these two lines to /etc/security/limits.conf

mysql hard nofile 65535
mysql soft nofile 65535

append this line to /usr/lib/systemd/system/mysqld.service (in the [service] section)


then finally reboot and check that those error messages have disappeared from your mysql error log.


This appears to be some bug in the new mysqld. I had the same problem. Setting max_connections to 700 worked, but if I set it to 900, it was reset to 214 during startup. If this was a purposeful change, then it would have lowered it to 700 or something similar, the value 214 doesn't make sense.
Anyway, upping the descriptor limit with ulimit -n fixes the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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