centos 重新启动服务器后无法启动MariaDB 10.3数据库服务器

fcg9iug3  于 2022-11-08  发布在  其他
关注(0)|答案(1)|浏览(740)

重新启动服务器后,mariadb无法启动,并且无法获取数据库
于是我输入了服务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)
uajslkp6

uajslkp61#

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

相关问题