我在 Linux Debian 9(stretch)上安装了 MariaDB + Nginx。
安装 MariaDB 并尝试启动它后,我收到错误消息:[Warning] Could not increase number of max_open_files to more than 4096 (request: 4214)
.
所以我用谷歌搜索它,它告诉我我应该改变 LimiNOFILE
到 10000 在 /etc/systemd/system/mysql.service
.我这样做了,做了 deamon-reload 并且它什么也没做。我仍然收到相同的错误消息。我尝试重新安装 MariaDB,但这也无济于事。我还加了 LimitMEMLOCK=10000
在我的文件的最后,这并没有改变任何东西。
完整追溯:
Link
先感谢您
最佳答案
我通过重新安装 MariaDB 解决了这个问题
$ sudo apt-get purge mariadb-server
您应该检查它是否仍在系统上:
$ sudo dpkg -l | grep mariadb
如果是,请执行以下操作:
$ sudo apt-get purge mariadb-common
但在此之前,我通过
htop
杀死了与 MariaDB/MySQL 相关的所有内容。 .然后是安装它的标准程序:
$ sudo apt update
$ sudo apt install mariadb-server
$ sudo mysql_secure_installation
关于mysql - 无法将 max_open_files 的数量增加到 4096 以上(请求 : 4214),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60248748/