原文http://blog.itpub.net/30127122/viewspace-2140277/
系統的值是正確的。然后修改
/etc/my
.cnf配置文件,添加
open_files_limit=65535
重啟服務 之后 查看 show variables like
'%open%'
; 發現open_files_limit的值 還是1024
此時我們需要修改最后一個地方
cat
-n
/etc/systemd/system/mysql
.service
在mysql.service中添加
LimitNOFILE=65535
#新加入的內容 添加在最后一行
重啟服務服務,修改了mysql.server有可能需要systemctl daemon-reload
innobackupex 進行備份的時候 產生too many
open
files
發現我mysql下面文件數大於10W
此時需要設置
ulimit
-n 1048576 重啟后失效 所以還需要修改系統配置文件
修改系統配置文件
/etc/security/limits
.conf
* soft nofile 1048576
* hard nofile 1048576
並且設置 my.cnf
open
-files-limit=1048576 重啟mysql服務
問解決題