我正在运行 MariaDB(libmysql - 5.5.41-MariaDB),今天我注意到我无法通过命令行转到 mysql 来创建转储文件。它会抛出一个错误:
mysql:无法读取“/etc/my.cnf”的目录。(Errcode: 2) 默认处理中的致命错误。程序中止
不知道为什么它需要读取名为“my.cnf”的目录。但我确实在 etc 文件夹中看到了一个名为“my.cnf.d”的目录。可能是某种拼写错误,但是当我转到 my.cnf 文件时,我没有注意到任何设置。唯一与之密切相关的是:
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
Run Code Online (Sandbox Code Playgroud)
这是最近发生的事情,我没有更改设置中的任何内容,所以我不确定 mariadb 发生了什么。任何帮助,将不胜感激。
编辑:好的,我通过执行 mkdir my.cnf 解决了这个问题。(不确定这个目录需要什么,因为它里面什么都没有。永远不要对 my.cnf 做任何更改,因为它开始需要这个目录..
Cron 作业过去已经工作了几个月,但最近我的服务器负载很高,现在 cron 作业没有执行我的 php 文件(与之前工作的相同)。当我检查 cron 日志时,我看到了这一点,我认为这与问题有关:
(CRON) EXEC FAILED (/usr/sbin/sendmail): Resource temporarily unavailable
我需要做什么来解决这个问题?我正在运行 CentOS 7。
编辑:我将此标记为已回答,因为我认为进程挂起导致了此问题。今天,我醒来,同样的问题发生了。我想知道是什么原因造成的。
在 cron 日志中,我看到:
Oct 11 05:01:01 run-parts(/etc/cron.hourly)[25431]: starting 0anacron
Oct 11 05:01:01 run-parts(/etc/cron.hourly)[25444]: finished 0anacron
Oct 11 05:01:01 run-parts(/etc/cron.hourly)[25431]: starting 0yum-hourly.cron
Oct 11 05:01:01 run-parts(/etc/cron.hourly)[25450]: finished 0yum-hourly.cron
Oct 11 05:01:01 CROND[25434]: (CRON) EXEC FAILED (/usr/sbin/sendmail): Resource temporarily unavailable
Oct 11 05:01:01 CROND[25429]: (apache) MAIL (mailed 71 bytes of output but got status 0x0001
Run Code Online (Sandbox Code Playgroud)
更新:
我注意到我的邮件日志中出现了两件事。
Oct 8 14:01:39 postfix/local[12886]: 5180C2D098A5: …
Run Code Online (Sandbox Code Playgroud)