Ubuntu – mysql 5.6 – max connections 214

You try to increase your connections to 1000 by editing /etc/mysql/my.cnf (change max_connections=1000) , but when you login to your database, you can only see your mysql only accept upto 214 connections?

It’s because the open_files_limit in Ubuntu system, here is the fix:
Edit

nano /lib/systemd/system/mysql.service

And add this line to the end:

LimitNOFILE=8192

Then run the 2 below commands or reboot the server

systemctl daemon-reload
systemctl restart mysql.service

Leave a Reply

Your email address will not be published. Required fields are marked *