I have tried every Stack Overflow article I could find and I can't get this to work. I had an EC2 instance that was a little too small so I upgraded it. MySQL won't start no matter what I do.
This is the error:
● 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.\
When I navigate to the error.log file, this is what it says:
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.
I have no idea what to do. Nothing I've done has worked so far. I have edited the my.cnf file, but nothing. Is there something I'm missing?