MySQL Database Server Won't Start

SYSTEM INFORMATION
OS type and version Ubuntu Linix 20.04.4
Virtualmin version 7.1-1
Webmin version 1.994
MySQL version 8.0.30-0ubuntu0

Good afternoon,

I’m hoping you all might be able to help me out. The MySQL database refuses to start on my server. If I click the triangle it attempts to start but just goes back to a green triangle. It was working fine until a couple days ago. I ran some updates from the update panel and after that I lost access to my MySQL as well as my IMAP server. I don’t have any backups of my sites other than what I’ve been able to take since MySQL going down.

If I proceed to the MySQL Database Server page I’m told:

The full MySQL error message was : DBI connect failed : Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

If I attempt to click ‘Start MySQL Server’ I’m taken to a message that tells me:
Failed to start database :
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
If I run ‘systemctl status mysql.service’ I’m given:
 ● mysql.service - MySQL Community Server
 Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
 Active: failed (Result: exit-code) since Sun 2022-07-31 21:23:11 CEST; 1min 19s ago
Process: 118235 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Process: 118243 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Main PID: 118243 (code=exited, status=1/FAILURE)
 Status: "Server shutdown complete"

Jul 31 21:23:11 VirtualminWebServer systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
Jul 31 21:23:11 VirtualminWebServer systemd[1]: Stopped MySQL Community Server.
Jul 31 21:23:11 VirtualminWebServer systemd[1]: mysql.service: Start request repeated too quickly.
Jul 31 21:23:11 VirtualminWebServer systemd[1]: mysql.service: Failed with result 'exit-code'.
Jul 31 21:23:11 VirtualminWebServer systemd[1]: Failed to start MySQL Community Server.
When I run ‘journalctl -xe’ I’m given:

A long page of job identifiers that all seem to have finished successfully. Searching the document for MySQL didn’t bring any results.

Does anyone have any ideas for how I could restore MySQL on this or at least be able to transfer the databases for existing Wordpress sites to a new installation at this point?

Thank you!

This may help

I was incorrect on journalctl -xe. It actually does give some information I didn’t see earlier. Here’s what comes from it:

-- Subject: A stop job for unit mysql.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A stop job for unit mysql.service has finished.
--
-- The job identifier is 1293793 and the job result is done.
Aug 02 16:50:18 VirtualminWebServer systemd[1]: mysql.service: Start request re>
Aug 02 16:50:18 VirtualminWebServer systemd[1]: mysql.service: Failed with resu>
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit mysql.service has entered the 'failed' state with result 'exit-code>
Aug 02 16:50:18 VirtualminWebServer systemd[1]: Failed to start MySQL Community>
-- Subject: A start job for unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit mysql.service has finished with a failure.
--
-- The job identifier is 1293793 and the job result is failed.
Aug 02 16:50:19 VirtualminWebServer postfix/smtpd[332511]: disconnect from unkn>
lines 5560-5582/5582 (END)
-- Subject: A stop job for unit mysql.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A stop job for unit mysql.service has finished.
--
-- The job identifier is 1293793 and the job result is done.
Aug 02 16:50:18 VirtualminWebServer systemd[1]: mysql.service: Start request repeated too quickly.
Aug 02 16:50:18 VirtualminWebServer systemd[1]: mysql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit mysql.service has entered the 'failed' state with result 'exit-code'.
Aug 02 16:50:18 VirtualminWebServer systemd[1]: Failed to start MySQL Community Server.
-- Subject: A start job for unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit mysql.service has finished with a failure.
--
-- The job identifier is 1293793 and the job result is failed.
Aug 02 16:50:19 VirtualminWebServer postfix/smtpd[332511]: disconnect from unknown[5.34.207.225] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4

Here’s the MySQL error log:

root@VirtualminWebServer:~# tail -f /var/log/mysql/error.log
2022-08-02T14:55:33.986681Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-02T14:55:33.987350Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30-0ubuntu0.20.04.2)  (Ubuntu).
2022-08-02T14:55:34.590847Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30-0ubuntu0.20.04.2) starting as process 333624
2022-08-02T14:55:34.598664Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-02T14:55:35.151287Z 1 [ERROR] [MY-012526] [InnoDB] Upgrade is not supported after a crash or shutdown with innodb_fast_shutdown = 2. This redo log was created with MySQL 8.0.29, and it appears logically non empty. Please follow the instructions at http://dev.mysql.com/doc/refman/8.0/en/upgrading.html
2022-08-02T14:55:35.151315Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error.
2022-08-02T14:55:35.498426Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-08-02T14:55:35.498656Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-08-02T14:55:35.498678Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-02T14:55:35.499269Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30-0ubuntu0.20.04.2)  (Ubuntu).

I’ve tried going through the first link on socket errors but I’m not able to find my socket in the list at all. If I run:

sudo find / -type s

I get a ton of /var/lib/apache2/fcgid/sock/1234.1 type listings that are just numbers for files. I have nothing like their example of /run/mysqld/mysqld.sock from the guide. Is this normal?

No idea, BTW why are you running mysqld, default install of Virtualmin is MariaDB and what I gather then installing mysqld is not a wise move.

Virtualmin has been installing MySQL for me on Ubuntu 18.04 and 20.04. So I guess he hasn’t changed that.

Really never knew that.

Steve

MariaDB on Ubuntu 20.04 and 22.04 is default with Virtualmin 7 only. Ubuntu 20.04 (and earlier versions) with Virtualmin 6 installs will run MySQL!

1 Like