【问题标题】:Failed to start MariaDB 10.3 database server after reboot server重启服务器后无法启动 MariaDB 10.3 数据库服务器
【发布时间】:2021-11-06 13:26:22
【问题描述】:

重启后mariadb服务器启动失败,无法获取数据库

所以我输入了 service mariadb restart; journalctl -xe 查看详细错误:

[root@server ~]# service mariadb restart; journalctl -xe
Redirecting to /bin/systemctl restart mariadb.service
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit user-1001.slice has finished shutting down.
Sep 10 01:13:27 server.itop.one polkitd[8162]: Registered Authentication Agent for unix-process:18782:236011 (system bus name :1.307 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop
Sep 10 01:13:27 server.itop.one systemd[1]: Starting MariaDB 10.3.31 database server...
-- Subject: Unit mariadb.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mariadb.service has begun starting up.
Sep 10 01:13:28 server.itop.one mysqld[18932]: 2021-09-10  1:13:28 0 [Note] /usr/sbin/mysqld (mysqld 10.3.31-MariaDB-log) starting as process 18932 ...
Sep 10 01:13:28 server.itop.one systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
Sep 10 01:13:28 server.itop.one systemd[1]: Failed to start MariaDB 10.3.31 database server.
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mariadb.service has failed.
-- 
-- The result is failed.
Sep 10 01:13:28 server.itop.one systemd[1]: Unit mariadb.service entered failed state.
Sep 10 01:13:28 server.itop.one systemd[1]: mariadb.service failed.
Sep 10 01:13:28 server.itop.one polkitd[8162]: Unregistered Authentication Agent for unix-process:18782:236011 (system bus name :1.307, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US
lines 2203-2225/2225 (END)

【问题讨论】:

  • journalctl -n 50 -u mariadb.service 显示什么?

标签: mysql centos mariadb


【解决方案1】:

我只是面临同样的情况。 到目前为止,我的结论是“systemd”类型不会将其作为后台进程启动,并且由于 mysqld intself 的行为类似于后台守护进程(就像它实际上应该那样),systemd 在设置后 900 秒后将其杀死。 现在我不能说为什么会这样,我也不知道如何改变它,但我的解决方法是自己从 shell 中将 mysqld 作为守护进程启动,这样它就不会被 systemd 杀死。超时。

【讨论】:

  • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
猜你喜欢
  • 2021-09-21
  • 2021-04-06
  • 2018-10-13
  • 2014-04-23
  • 2013-07-19
  • 1970-01-01
  • 2020-10-04
  • 2011-04-21
相关资源
最近更新 更多