MySQL 无法随机启动,不知道原因

MySQL 无法随机启动,不知道原因

我尝试了所有我能找到的 Stack Overflow 文章,但还是无法解决这个问题。我有一个 EC2 实例,但它有点太小了,所以我升级了它。无论我做什么,MySQL 都无法启动。

这是错误:

● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sat 2021-11-06 02:37:05 UTC; 4s ago
    Process: 4535 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=1/FAILURE)

Nov 06 02:37:05 ip-*** systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
Nov 06 02:37:05 ip-*** systemd[1]: Stopped MySQL Community Server.
Nov 06 02:37:05 ip-*** systemd[1]: mysql.service: Start request repeated too quickly.
Nov 06 02:37:05 ip-*** systemd[1]: mysql.service: Failed with result 'exit-code'.
Nov 06 02:37:05 ip-*** systemd[1]: Failed to start MySQL Community Server.\

当我导航到 error.log 文件时,它显示的内容如下:

2021-11-06T01:41:39.704098Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.27-0ubuntu0.20.04.1) starting as process 2926
2021-11-06T01:41:40.977825Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-11-06T01:43:04.727618Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.27-0ubuntu0.20.04.1) starting as process 3042
2021-11-06T01:43:06.666942Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-11-06T01:43:09.463884Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.27-0ubuntu0.20.04.1) starting as process 3054
2021-11-06T01:43:10.316876Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-11-06T01:43:17.839776Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.27-0ubuntu0.20.04.1) starting as process 3138
2021-11-06T01:43:20.095965Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

我不知道该怎么办。到目前为止,我所做的一切都没有奏效。我编辑了 my.cnf 文件,但什么也没做。我是不是漏掉了什么?

相关内容