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?
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
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?