Welcome to my website, have a nice day!
Dream it, Do it, Make it!

MySQL修改max_open_files设置

MYSQL默认的最大允许打开文件数为32768,但是可以通过修改启动服务的LimitNOFILE对应值来增大允许打开的文件数。

环境信息:

  • CentOS Linux release 7.9.2009 (Core);
  • mariadb-10.6.8;

MariaDB Galera集群启动时报错:

Aug 07 22:35:42 sd-vm-0003929.novalocal mariadbd[16941]: 2022-08-07 22:35:42 0 [Warning] Could not increase number of max_open_files to more than 32768 (request: 33039)

具体修改的位置在/usr/lib/systemd/system/mysqld.service

LimitNOFILE=65536

然后重启MariaDB和守护进程即可。

systemctl daemon-reload

systemctl restart mysql

参考: Could not increase number of max_open_files to more than… (Solution);

赞(0)
未经允许禁止转载:Ddmit » MySQL修改max_open_files设置

评论 抢沙发

登录

找回密码

注册