You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

服务器重启后MariaDB无法启动的问题求助

服务器重启后MariaDB无法启动的问题求助

大家好,我用LEMP栈运行自己的网站,之前一直都挺稳定的。昨天突然监控提示服务器没响应ping,我就重启了服务器,结果麻烦来了——MariaDB服务死活启动不了,网站直接弹出“Error establishing a database connection”的错误。

我试着执行sudo service mariadb start启动服务,结果得到这个错误提示:

Job for mariadb.service failed because a fatal signal was delivered to the control process.
See "systemctl status mariadb.service" and "journalctl -xe" for details.

下面是systemctl status mariadb.service的输出内容:

mariadb.service - MariaDB 10.4.32 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: activating (auto-restart) (Result: signal) since Thu 2023-12-28 00:05:15 PKT; 212ms ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 135599 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Process: 135604 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 135612 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-envir>
Process: 135752 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=killed, signal=ABRT)
Main PID: 135752 (code=killed, signal=ABRT)

还有journalctl -xe的部分输出:

-- The job identifier is 8.
Dec 27 23:21:09 vps.example.com systemd[8592]: Listening on debconf communication socket.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit UNIT has finished successfully.
--
-- The job identifier is 10.
Dec 27 23:21:09 vps.example.com systemd[8592]: Listening on D-Bus User Message Bus Socket.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit UNIT has finished successfully.
--
-- The job identifier is 7.
Dec 27 23:21:09 vps.example.com systemd[8592]: Reached target Sockets.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit UNIT has finished successfully.
--
-- The job identifier is 3.
Dec 27 23:21:09 vps.example.com systemd[8592]: Reached target Basic System.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit UNIT has finished successfully.
--
-- The job identifier is 2.
Dec 27 23:21:09 vps.example.com systemd[8592]: Reached target Main User Target.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit UNIT has finished successfully.
--
-- The job identifier is 1.
Dec 27 23:21:09 vps.example.com systemd[8592]: Startup finished in 119ms.
-- Subject: User manager start-up is now complete
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The user manager instance for user 1000 has been started. All services queued
-- for starting have been started. Note that other services might still be starting
-- up or be started at any later time.
--
-- Startup of the manager took 119349 microseconds.
Dec 27 23:21:53 vps.example.com polkit-agent-helper-1[9548]: pam_unix(polkit-1:auth): authentication failure; logname= uid=1000 euid=0 tty= ruser=alex rhost=  user=alex
Dec 27 23:22:19 vps.example.com polkit-agent-helper-1[10365]: pam_unix(polkit-1:auth): authentication failure; logname= uid=1000 euid=0 tty= ruser=alex rhost=  user=alex

另外还有几个情况:

  • 执行sudo service --status-all查看所有服务,列表里居然找不到MariaDB
  • 我试过单独重启Nginx、PHP,甚至再次重启整个服务器,但问题依然存在

我现在完全摸不着头脑,不知道问题根源在哪,有没有大佬能帮忙分析下,给点排查或者解决的建议?

备注:内容来源于stack exchange,提问作者Ali

火山引擎 最新活动