OS : CentOS7
MySQL : install rpm package from mysql official repository
1. mysql error log
[Warning] Buffered warning: Could not increase number of max_open_files to more than 1024 (request: 16384)
[Warning] Buffered warning: Changed limits: max_connections: 214 (requested 3000)
[Warning] Buffered warning: Changed limits: table_cache: 400 (requested 2048)
|
2. modify service file
file path : /usr/lib/systemd/system/mysqld.service
add
LimitNOFILE=163840
LimitNPROC=163840
|
3. reload
# systemctl daemon-reload
for this error message…
Warning: mysqld.service changed on disk. Run ’systemctl daemon-reload’ to reload units.
|
4. Restart mysql
# service mysqld restart
Leave a Reply