mysql报error24 too many open file解决方法

看到 too many open file第一反应就是修改/etc/security/limits.conf文件,改完重启无效

然后改my.cnf,【mysqld】下增加行open_files_limit = 102400,重启无效

编辑/etc/systemd/system/multi-user.target.wants/mysqld.service文件,最后加上一行LimitNOFILE=102400

systemctl daemon-reload  # 重新加载配置文件

重启数据库,搞定

有的/mysqld.service文件不在此目录,可以find去查找具体位置

原文地址:https://www.cnblogs.com/tiantianhappy/p/14173521.html