[root@hs-79 etc]# ulimit -n 204800 系统的值是正确的。然后修改/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服务 问解决题
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30127122/viewspace-2140277/ ,如需转载,请注明出处,否则将追究法律责任。