I have spent most of the day trying to recover from a crash followed by a couple of bad decisions.
While copying a table from DB1 to DB2, using phpmyadmin, MySQL crashed and from that point, I just was not able to access MySQL in any way.
Heart started to beat faster than usual and after much searching online, I followed a suggestion that some said had worked for them - Well, it did not for me.
Faced with not being able to access MySQL nor run any command (they all failed with denied ... using password YES or NO) - I tried my passwords that I know are correct, I used them in my PHP code but nothing worked.
BAD MOVE: I proceeded to purge phpmyadmin and mysql.
Before doing so, I copied /var/lib/mysql to ~/mysql so I have a copy of the entire directory as it was as of the crash and prior to purge/resinstall.
I tried this: Recover MySQL /var/lib/mysql after update
but I am getting this error as I try to restart mysql
Starting mysql (via systemctl): mysql.serviceJob for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. failed!
systemctl status mysql.service shows
● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sat 2021-08-21 06:20:09 UTC; 6min ago Process: 23904 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS) Process: 23912 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE) Main PID: 23912 (code=exited, status=1/FAILURE) Status: "Server startup in progress"
Aug 21 06:20:09 mail.shipsuites.com systemd: mysql.service: Scheduled restart job, restart counter is at 5. Aug 21 06:20:09 mail.shipsuites.com systemd: Stopped MySQL Community Server. Aug 21 06:20:09 mail.shipsuites.com systemd: mysql.service: Start request repeated too quickly. Aug 21 06:20:09 mail.shipsuites.com systemd: mysql.service: Failed with result 'exit-code'. Aug 21 06:20:09 mail.shipsuites.com systemd: Failed to start MySQL Community Server.
Any suggestion will be greatly appreciated - I am at a loss here and nothing I find seems to work for me.
OS: Ubuntu 20 MySQL 8.0 (fresh install)