How to fix the «Could not increase number of max_open_files to more than 1024» MySQL issue?

mysql

(Dmitry Fedyuk) #1

Step 1

Add to /etc/init.d/mysql (Ubuntu, Debian) or etc/systemd/system/mysqld.service.d/limits.conf (CentOS):

LimitNOFILE=65535
LimitNPROC=65535

Step 2

Add to /etc/security/limits.conf:

mysql soft nofile 65535
mysql hard nofile 65535

Step 3

Reboot.

unix.stackexchange.com/a/157910