mariadb啟動報錯“Could not increase number of max_open_files to more than 1024 (request: 5035)”


故障截圖

解決辦法

vim /usr/lib/systemd/system/mariadb.service
#在[service]下面加

[Service]
LimitNOFILE=infinity

驗證

systemctl daemon-reload
systemctl   restart  mariadb
systemctl   status   mariadb

 

 

拓展
MySQL報錯 “Could not increase number of max_open_files to more than 1024“

修改內核參數

 vim /etc/security/limits.conf

*               soft    nofile          8192
*               hard    nofile          8192

重啟系統或臨時修改內核參數

 # ulimit -n 8192
 systemctl   restart  mysqld


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM