如何让 MariaDB 恢复操作?

如何让 MariaDB 恢复操作?

我正在开发我的 WordPress 网站,并获得一个适合我的非数据库 HTML 版本 数据挖掘,例如正确运行于https://orthodoxchurchfathers.comhttps://searchgkchesterton.com,运行 awget -r --no-check-certificate https://cjshayward.com创建站点的部分版本,其中页面作为单独的文件而不是依赖于数据库。

当我查看它是否正常工作时,它给出了一个 Wordpress 错误页面,上面写着“建立数据库连接时出错”。稍微戳了一下,发现 Mariadb 的服务器没有运行,并且在重新启动后仍然没有运行。

从命令行:

# service mysqld start
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
root@technoluddites:~/wordpress/wp-content# systemctl status mariadb.service
● mariadb.service - MariaDB 10.3.22 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2022-11-15 12:44:41 CST; 15s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 5287 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
  Process: 5288 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 5290 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_STA
  Process: 5342 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
 Main PID: 5342 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

Nov 15 12:44:34 technoluddites.org systemd[1]: Starting MariaDB 10.3.22 database server...
Nov 15 12:44:35 technoluddites.org mysqld[5342]: 2022-11-15 12:44:35 0 [Note] /usr/sbin/mysqld (mysqld 10.3.22-MariaDB-0+deb10u1) starting as process 5342 ...
Nov 15 12:44:41 technoluddites.org systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Nov 15 12:44:41 technoluddites.org systemd[1]: mariadb.service: Failed with result 'exit-code'.
Nov 15 12:44:41 technoluddites.org systemd[1]: Failed to start MariaDB 10.3.22 database server.
root@technoluddites:~/wordpress/wp-content# journalctl -xe
Nov 15 12:45:15 technoluddites.org postfix/smtp[5479]: connect to partcafe.com[162.210.199.85]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5475]: connect to xrumer.app[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5482]: connect to shavers.hair[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5487]: connect to hard.raytoy.com[23.82.12.35]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5476]: connect to hard.raytoy.com[37.48.65.136]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5483]: connect to makeup.blue[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5491]: connect to free.pieurl.com[81.171.28.46]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5485]: connect to partcafe.com[23.82.12.37]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5484]: connect to hard.raytoy.com[37.48.65.136]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5480]: connect to xrummer.com[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5474]: connect to koobiyocabs.com[99.83.154.118]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5489]: connect to partcafe.com[185.107.56.54]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5497]: connect to customketodiet.tips[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5377]: connect to customketodiet.kitchen[99.83.154.118]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5499]: connect to partcafe.com[185.107.56.54]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5372]: connect to xrummer.com[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5486]: connect to 1000welectricscooter.com[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5504]: connect to e.razore100.fans[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5481]: connect to chestpain.one[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5502]: connect to thailandmovers.com[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5492]: connect to linkbuildingtools.club[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5505]: connect to c.bangkokremovals.com[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5506]: connect to a.roofvent.xyz[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5376]: connect to xrummer.com[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5494]: connect to c.razore100.fans[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5496]: connect to e.shavers.hair[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5495]: connect to d.japantravel.network[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5383]: connect to customketodiet.kitchen[99.83.154.118]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5501]: connect to a.singaporetravel.network[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5369]: connect to a.southafricatravel.club[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5503]: connect to f.babyteeth.club[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5507]: connect to dnatest.news[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5498]: connect to i.most-wanted-stuff.com[64.44.23.135]:25: Connection timed out
Nov 15 12:45:15 technoluddites.org postfix/smtp[5381]: connect to a.australia-travel.news[64.44.23.135]:25: Connection timed out
Nov 15 12:45:17 technoluddites.org CRON[5523]: pam_unix(cron:session): session closed for user root
Nov 15 12:45:20 technoluddites.org sshd[5666]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=212.34.245.65  user=root
Nov 15 12:45:22 technoluddites.org sshd[5666]: Failed password for root from 212.34.245.65 port 43956 ssh2
Nov 15 12:45:23 technoluddites.org sshd[5666]: Received disconnect from 212.34.245.65 port 43956:11: Bye Bye [preauth]
Nov 15 12:45:23 technoluddites.org sshd[5666]: Disconnected from authenticating user root 212.34.245.65 port 43956 [preauth]
Nov 15 12:45:25 technoluddites.org sshd[5668]: Connection closed by 125.119.1.16 port 21724 [preauth]

到目前为止,我所做的搜索结果显示“如果数据目录中没有任何值得一提的内容,请清除数据目录”,也许需要重新安装 MariaDB,但尚未提供任何有关该怎么做的建议如果我不想丢失一些实际上值得我保留在数据库中的东西。

我在我的网站上贴了一点胶带,将 Wordpress 安装目录打上柏油,然后执行以下操作:

# for x in `find . -name \*.html`; do cp --parents $x ~/wordpress; echo $x; done

从 wget 创建的快照中,重命名 ~/wordpress/index.php 后,它或多或少像以前一样为站点提供服务。因此,到目前为止,这种症状至少得到了部分抑制,但在某种程度上对解决问题没有任何作用。

我的下一个想法是移出(而不是删除)数据库文件,看看是否可以使其正常工作,然后看看是否可以确定是什么阻止了 MariaDB 启动。

我之前运行过递归 wget,没有报告问题。

尝试 wget 是如何关闭或触发关闭数据库的?

我该怎么做才能让 MariaDB 正常工作而不丢弃数据库?

除了系统地移出数据库并查看MariaDB是否会启动之外,还有其他方法吗?

迁移到 MySQL 有意义吗?

答案1

你需要找出为什么MariaDB 未启动。查看此页面MariaDB 的故障排除建议网站。

它说:

失败的原因几乎肯定会写入错误日志中,如果您手动启动 MariaDB,则会写入控制台。默认情况下,错误日志名为 host-name.err 并写入数据目录。常见地点:

/var/日志/

/var/日志/mysql

如果日志没有显示足够的信息,请尝试增加日志记录的详细程度并尝试再次启动 MariaDB。

相关内容