MySql 服务启动失败且没有任何有意义的信息(CentOS 7)

MySql 服务启动失败且没有任何有意义的信息(CentOS 7)
[root@myserver my.cnf.d]# service mysql start
Starting MySQL. ERROR!

这就是我得到的全部信息。我尝试检查日志,但找不到与此相关的任何内容。在我重新启动机器之前,数据库运行良好。数据库服务器实际上是一个 MariaDB 实例。

谁知道我可以在哪里寻找问题的根源?

系统日志也不包含任何有意义的内容:

cat /var/log/messages
#last few lines:
Apr 22 11:00:01 myserver systemd: Started Session 128 of user root.
Apr 22 11:01:01 myserver systemd: Starting Session 129 of user root.
Apr 22 11:01:01 myserver systemd: Started Session 129 of user root.
Apr 22 11:10:01 myserver systemd: Starting Session 130 of user root.
Apr 22 11:10:01 myserver systemd: Started Session 130 of user root.

答案1

显然,服务器日志记录已被禁用。我必须编辑 /etc/my.cnf.d/server.cnf 并在 mysqld 部分下添加以下行:

   log-error=/var/log/mysqllog

之后,我可以获得正确的日志,然后让我确定问题(在我的情况下,这是恢复后对文件夹的访问权限问题。)

相关内容