[mysql] Buffered warning: Could not increase number of max_open_files to more than 1024 on centos

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
About KENNETH 19694 Articles
지락문화예술공작단

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.