"Error! MySQL is not running on your system - database list could not be retrieved."

Howdy all,
I have a VPS that I installed Virtualmin on to host a handful of domains. For a while it’s run pretty smoothly but I recently noticed an issue with one of my sites that relies on a MySQL DB; when I went to check the database I received:

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

…so naturally I attempted to restart it. When I did, I received:

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.

I’ve been doing some research but turned up no real suitable results yet. If I end up with a solution, then I’ll be sure to note it here for anyone else encountering the same problem (or perhaps just future me… hello there future me!); however, any and every bit of help is awesome and definitely appreciated!

SYSTEM INFORMATION
OS type and version: Ubuntu Linux 20.04.2
Webmin version: 1.973
Virtualmin version: 6.16

Nobody can guess what’s wrong without the logs.

Do what it tells you: journalctl -xe right after trying to restart the service.

You can also see the logs for just the mysql unit with journalctl -u mysql or tail/follow with journalctl -fu mysql.

1 Like

Joe, you’re absolutely right!
I thought I had actually included my logs and, quite frankly, not sure how I missed the fact that I didn’t.

Anyways, journalctl -fu mysql is as follows:

Also, journalctl -xe yields:

-- The job identifier is 1967 and the job result is done.
Jul 28 16:28:58 banjo.(Domain Redacted) sshd[2625]: Invalid user nobodynobody from (IP Address Redacted) port 33050
Jul 28 16:28:58 banjo.(Domain Redacted) sshd[2625]: pam_unix(sshd:auth): check pass; user unknown
Jul 28 16:28:58 banjo.(Domain Redacted) sshd[2625]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=(IP Address Redacted)
Jul 28 16:29:00 banjo.(Domain Redacted) sshd[2625]: Failed password for invalid user nobodynobody from (IP Address Redacted) port 33050 ssh2
Jul 28 16:29:02 banjo.(Domain Redacted) sshd[2625]: Received disconnect from (IP Address Redacted) port 33050:11: Bye Bye [preauth]
Jul 28 16:29:02 banjo.(Domain Redacted) sshd[2625]: Disconnected from invalid user nobodynobody (IP Address Redacted) port 33050 [preauth]
Jul 28 16:29:04 banjo.(Domain Redacted) named[598]: client @0x7f65f400a550 (IP Address Redacted)#80 (pizzaseo.com): query (cache) 'pizzaseo.com/RRSIG/IN' denied
Jul 28 16:29:23 banjo.(Domain Redacted) named[598]: client @0x7f65f400a550 (IP Address Redacted)#80 (pizzaseo.com): query (cache) 'pizzaseo.com/RRSIG/IN' denied
Jul 28 16:29:24 banjo.(Domain Redacted) named[598]: client @0x7f65f400a550 (IP Address Redacted)#80 (pizzaseo.com): query (cache) 'pizzaseo.com/RRSIG/IN' denied
Jul 28 16:29:28 banjo.(Domain Redacted) sshd[2635]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=(IP Address Redacted)  user=root
Jul 28 16:29:29 banjo.(Domain Redacted) named[598]: client @0x7f65f400a550 (IP Address Redacted)#80 (pizzaseo.com): query (cache) 'pizzaseo.com/RRSIG/IN' denied
Jul 28 16:29:29 banjo.(Domain Redacted) sshd[2635]: Failed password for root from (IP Address Redacted) port 35773 ssh2
Jul 28 16:29:30 banjo.(Domain Redacted) sshd[2635]: Received disconnect from (IP Address Redacted) port 35773:11: Bye Bye [preauth]
Jul 28 16:29:30 banjo.(Domain Redacted) sshd[2635]: Disconnected from authenticating user root (IP Address Redacted) port 35773 [preauth]
Jul 28 16:29:50 banjo.(Domain Redacted) systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- An ExecStart= process belonging to unit mysql.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
Jul 28 16:29:50 banjo.(Domain Redacted) 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'.
Jul 28 16:29:50 banjo.(Domain Redacted) 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 151 and the job result is failed.
Jul 28 16:29:50 banjo.(Domain Redacted) systemd[1]: Reached target Multi-User System.
-- Subject: A start job for unit multi-user.target has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit multi-user.target has finished successfully.
-- 
-- The job identifier is 8.
Jul 28 16:29:50 banjo.(Domain Redacted) systemd[1]: Reached target Graphical Interface.
-- Subject: A start job for unit graphical.target has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit graphical.target has finished successfully.
-- 
-- The job identifier is 7.
Jul 28 16:29:50 banjo.(Domain Redacted) systemd[1]: Starting Execute cloud user/final scripts...
-- Subject: A start job for unit cloud-final.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit cloud-final.service has begun execution.
-- 
-- The job identifier is 159.
Jul 28 16:29:50 banjo.(Domain Redacted) systemd[1]: Starting Update UTMP about System Runlevel Changes...
-- Subject: A start job for unit systemd-update-utmp-runlevel.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit systemd-update-utmp-runlevel.service has begun execution.
-- 
-- The job identifier is 130.
Jul 28 16:29:50 banjo.(Domain Redacted) systemd[1]: systemd-update-utmp-runlevel.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit systemd-update-utmp-runlevel.service has successfully entered the 'dead' state.
Jul 28 16:29:50 banjo.(Domain Redacted) systemd[1]: Finished Update UTMP about System Runlevel Changes.
-- Subject: A start job for unit systemd-update-utmp-runlevel.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit systemd-update-utmp-runlevel.service has finished successfully.
-- 
-- The job identifier is 130.
Jul 28 16:29:50 banjo.(Domain Redacted) systemd[1]: mysql.service: Scheduled restart job, restart counter is at 1.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Automatic restarting of the unit mysql.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Jul 28 16:29:50 banjo.(Domain Redacted) systemd[1]: Stopped MySQL Community Server.
-- 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 1968 and the job result is done.
Jul 28 16:29:50 banjo.(Domain Redacted) systemd[1]: Starting MySQL Community Server...
-- Subject: A start job for unit mysql.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit mysql.service has begun execution.
-- 
-- The job identifier is 1968.
Jul 28 16:29:52 banjo.(Domain Redacted) cloud-init[2689]: Cloud-init v. 21.2-3-g899bfaa9-0ubuntu2~20.04.1 running 'modules:final' at Wed, 28 Jul 2021 21:29:51 +0000. Up 189.98 seconds.
Jul 28 16:29:52 banjo.(Domain Redacted) cloud-init[2689]: Cloud-init v. 21.2-3-g899bfaa9-0ubuntu2~20.04.1 finished at Wed, 28 Jul 2021 21:29:52 +0000. Datasource DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net].  Up 190.17 seconds
Jul 28 16:29:52 banjo.(Domain Redacted) systemd[1]: Finished Execute cloud user/final scripts.
-- Subject: A start job for unit cloud-final.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit cloud-final.service has finished successfully.
-- 
-- The job identifier is 159.
Jul 28 16:29:52 banjo.(Domain Redacted) systemd[1]: Reached target Cloud-init target.
-- Subject: A start job for unit cloud-init.target has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit cloud-init.target has finished successfully.
-- 
-- The job identifier is 153.
Jul 28 16:29:53 banjo.(Domain Redacted) named[598]: client @0x7f65f400a550 (IP Address Redacted)#80 (pizzaseo.com): query (cache) 'pizzaseo.com/RRSIG/IN' denied
Jul 28 16:29:56 banjo.(Domain Redacted) sshd[2690]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=(IP Address Redacted)  user=root
Jul 28 16:29:58 banjo.(Domain Redacted) sshd[2690]: Failed password for root from (IP Address Redacted) port 57891 ssh2
Jul 28 16:29:59 banjo.(Domain Redacted) sshd[2690]: Received disconnect from (IP Address Redacted) port 57891:11: Bye Bye [preauth]
Jul 28 16:29:59 banjo.(Domain Redacted) sshd[2690]: Disconnected from authenticating user root (IP Address Redacted) port 57891 [preauth]
Jul 28 16:30:01 banjo.(Domain Redacted) CRON[2693]: pam_unix(cron:session): session opened for user root by (uid=0)
Jul 28 16:30:01 banjo.(Domain Redacted) CRON[2699]: (root) CMD (/etc/webmin/status/monitor.pl)
Jul 28 16:30:03 banjo.(Domain Redacted) CRON[2693]: pam_unix(cron:session): session closed for user root
Jul 28 16:30:04 banjo.(Domain Redacted) named[598]: client @0x7f65f400a550 (IP Address Redacted)#80 (pizzaseo.com): query (cache) 'pizzaseo.com/RRSIG/IN' denied
Jul 28 16:30:05 banjo.(Domain Redacted) named[598]: client @0x7f65f400a550 (IP Address Redacted)#80 (pizzaseo.com): query (cache) 'pizzaseo.com/RRSIG/IN' denied
Jul 28 16:30:14 banjo.(Domain Redacted) sshd[2717]: Accepted password for root from (IP Address Redacted) port 58320 ssh2
Jul 28 16:30:14 banjo.(Domain Redacted) sshd[2717]: pam_unix(sshd:session): session opened for user root by (uid=0)
Jul 28 16:30:14 banjo.(Domain Redacted) systemd-logind[547]: New session 12 of user root.
-- Subject: A new session 12 has been created for user root
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
-- 
-- A new session with the ID 12 has been created for the user root.
-- 
-- The leading process of the session is 2717.
Jul 28 16:30:14 banjo.(Domain Redacted) systemd[1]: Started Session 12 of user root.
-- Subject: A start job for unit session-12.scope has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit session-12.scope has finished successfully.
-- 
-- The job identifier is 2037.
Jul 28 16:30:16 banjo.(Domain Redacted) sshd[2756]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=(IP Address Redacted)  user=root
Jul 28 16:30:18 banjo.(Domain Redacted) sshd[2717]: Received disconnect from (IP Address Redacted) port 58320:11:
Jul 28 16:30:18 banjo.(Domain Redacted) sshd[2717]: Disconnected from user root (IP Address Redacted) port 58320
Jul 28 16:30:18 banjo.(Domain Redacted) systemd[1]: session-12.scope: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit session-12.scope has successfully entered the 'dead' state.
Jul 28 16:30:18 banjo.(Domain Redacted) sshd[2717]: pam_unix(sshd:session): session closed for user root
Jul 28 16:30:18 banjo.(Domain Redacted) systemd-logind[547]: Session 12 logged out. Waiting for processes to exit.
Jul 28 16:30:18 banjo.(Domain Redacted) systemd-logind[547]: Removed session 12.
-- Subject: Session 12 has been terminated
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
-- 
-- A session with the ID 12 has been terminated.
Jul 28 16:30:18 banjo.(Domain Redacted) sshd[2756]: Failed password for root from (IP Address Redacted) port 54432 ssh2
Jul 28 16:30:21 banjo.(Domain Redacted) sshd[2756]: Received disconnect from (IP Address Redacted) port 54432:11: Bye Bye [preauth]
Jul 28 16:30:21 banjo.(Domain Redacted) sshd[2756]: Disconnected from authenticating user root (IP Address Redacted) port 54432 [preauth]
Jul 28 16:30:26 banjo.(Domain Redacted) named[598]: client @0x7f65f400a550 (IP Address Redacted)#80 (pizzaseo.com): query (cache) 'pizzaseo.com/RRSIG/IN' denied
Jul 28 16:30:35 banjo.(Domain Redacted) sshd[2795]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=(IP Address Redacted)  user=root
Jul 28 16:30:36 banjo.(Domain Redacted) postfix/smtpd[2797]: connect from unknown[(IP Address Redacted)]
Jul 28 16:30:37 banjo.(Domain Redacted) sshd[2795]: Failed password for root from (IP Address Redacted) port 59822 ssh2
Jul 28 16:30:37 banjo.(Domain Redacted) saslauthd[800]: pam_unix(smtp:auth): check pass; user unknown
Jul 28 16:30:37 banjo.(Domain Redacted) saslauthd[800]: pam_unix(smtp:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
Jul 28 16:30:37 banjo.(Domain Redacted) sshd[2795]: Received disconnect from (IP Address Redacted) port 59822:11: Bye Bye [preauth]
Jul 28 16:30:37 banjo.(Domain Redacted) sshd[2795]: Disconnected from authenticating user root (IP Address Redacted) port 59822 [preauth]
Jul 28 16:30:39 banjo.(Domain Redacted) saslauthd[800]: DEBUG: auth_pam: pam_authenticate failed: Authentication failure
Jul 28 16:30:39 banjo.(Domain Redacted) saslauthd[800]:                 : auth failure: [user=control] [service=smtp] [realm=] [mech=pam] [reason=PAM auth error]
Jul 28 16:30:39 banjo.(Domain Redacted) postfix/smtpd[2797]: warning: unknown[(IP Address Redacted)]: SASL LOGIN authentication failed: authentication failure
Jul 28 16:30:39 banjo.(Domain Redacted) postfix/smtpd[2797]: disconnect from unknown[(IP Address Redacted)] ehlo=1 auth=0/1 quit=1 commands=2/3
Jul 28 16:30:49 banjo.(Domain Redacted) named[598]: client @0x7f65f400a550 (IP Address Redacted)#80 (pizzaseo.com): query (cache) 'pizzaseo.com/RRSIG/IN' denied
Jul 28 16:30:50 banjo.(Domain Redacted) named[598]: client @0x7f65f400a550 (IP Address Redacted)#80 (pizzaseo.com): query (cache) 'pizzaseo.com/RRSIG/IN' denied
Jul 28 16:30:55 banjo.(Domain Redacted) named[598]: client @0x7f65f400a550 (IP Address Redacted)#80 (pizzaseo.com): query (cache) 'pizzaseo.com/RRSIG/IN' denied
Jul 28 16:31:02 banjo.(Domain Redacted) sshd[2800]: Invalid user pass321 from (IP Address Redacted) port 39422
Jul 28 16:31:02 banjo.(Domain Redacted) sshd[2800]: pam_unix(sshd:auth): check pass; user unknown
Jul 28 16:31:02 banjo.(Domain Redacted) sshd[2800]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=(IP Address Redacted)
Jul 28 16:31:04 banjo.(Domain Redacted) sshd[2800]: Failed password for invalid user pass321 from (IP Address Redacted) port 39422 ssh2
Jul 28 16:31:05 banjo.(Domain Redacted) sshd[2800]: Received disconnect from (IP Address Redacted) port 39422:11: Bye Bye [preauth]
Jul 28 16:31:05 banjo.(Domain Redacted) sshd[2800]: Disconnected from invalid user pass321 (IP Address Redacted) port 39422 [preauth]
Jul 28 16:31:14 banjo.(Domain Redacted) named[598]: client @0x7f65f400a550 (IP Address Redacted)#80 (pizzaseo.com): query (cache) 'pizzaseo.com/RRSIG/IN' denied
Jul 28 16:31:18 banjo.(Domain Redacted) sshd[1995]: Received disconnect from (IP Address Redacted) port 58272:11:
Jul 28 16:31:18 banjo.(Domain Redacted) sshd[1995]: Disconnected from user root (IP Address Redacted) port 58272
Jul 28 16:31:18 banjo.(Domain Redacted) systemd[1]: session-1.scope: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit session-1.scope has successfully entered the 'dead' state.
Jul 28 16:31:18 banjo.(Domain Redacted) sshd[1995]: pam_unix(sshd:session): session closed for user root
Jul 28 16:31:18 banjo.(Domain Redacted) systemd-logind[547]: Session 1 logged out. Waiting for processes to exit.
Jul 28 16:31:18 banjo.(Domain Redacted) systemd-logind[547]: Removed session 1.
-- Subject: Session 1 has been terminated
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
-- 
-- A session with the ID 1 has been terminated.
Jul 28 16:31:20 banjo.(Domain Redacted) named[598]: client @0x7f65f400a550 (IP Address Redacted)#80 (pizzaseo.com): query (cache) 'pizzaseo.com/RRSIG/IN' denied
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[1]: Stopping User Manager for UID 0...
-- Subject: A stop job for unit user@0.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A stop job for unit user@0.service has begun execution.
-- 
-- The job identifier is 2110.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: Stopped target Main User Target.
-- Subject: A stop job for unit UNIT has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A stop job for unit UNIT has finished.
-- 
-- The job identifier is 18 and the job result is done.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: Stopped target Basic System.
-- Subject: A stop job for unit UNIT has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A stop job for unit UNIT has finished.
-- 
-- The job identifier is 19 and the job result is done.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: Stopped target Paths.
-- Subject: A stop job for unit UNIT has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A stop job for unit UNIT has finished.
-- 
-- The job identifier is 31 and the job result is done.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: Stopped target Sockets.
-- Subject: A stop job for unit UNIT has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A stop job for unit UNIT has finished.
-- 
-- The job identifier is 28 and the job result is done.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: Stopped target Timers.
-- Subject: A stop job for unit UNIT has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A stop job for unit UNIT has finished.
-- 
-- The job identifier is 24 and the job result is done.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: dbus.socket: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit UNIT has successfully entered the 'dead' state.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: Closed D-Bus User Message Bus Socket.
-- Subject: A stop job for unit UNIT has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A stop job for unit UNIT has finished.
-- 
-- The job identifier is 26 and the job result is done.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: dirmngr.socket: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit UNIT has successfully entered the 'dead' state.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: Closed GnuPG network certificate management daemon.
-- Subject: A stop job for unit UNIT has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A stop job for unit UNIT has finished.
-- 
-- The job identifier is 33 and the job result is done.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: gpg-agent-browser.socket: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit UNIT has successfully entered the 'dead' state.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: Closed GnuPG cryptographic agent and passphrase cache (access for web browsers).
-- Subject: A stop job for unit UNIT has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A stop job for unit UNIT has finished.
-- 
-- The job identifier is 32 and the job result is done.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: gpg-agent-extra.socket: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit UNIT has successfully entered the 'dead' state.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: Closed GnuPG cryptographic agent and passphrase cache (restricted).
-- Subject: A stop job for unit UNIT has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A stop job for unit UNIT has finished.
-- 
-- The job identifier is 30 and the job result is done.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: gpg-agent-ssh.socket: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit UNIT has successfully entered the 'dead' state.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: Closed GnuPG cryptographic agent (ssh-agent emulation).
-- Subject: A stop job for unit UNIT has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A stop job for unit UNIT has finished.
-- 
-- The job identifier is 29 and the job result is done.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: gpg-agent.socket: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit UNIT has successfully entered the 'dead' state.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: Closed GnuPG cryptographic agent and passphrase cache.
-- Subject: A stop job for unit UNIT has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A stop job for unit UNIT has finished.
-- 
-- The job identifier is 27 and the job result is done.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: pk-debconf-helper.socket: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit UNIT has successfully entered the 'dead' state.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: Closed debconf communication socket.
-- Subject: A stop job for unit UNIT has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A stop job for unit UNIT has finished.
-- 
-- The job identifier is 25 and the job result is done.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: Reached target Shutdown.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit UNIT has finished successfully.
-- 
-- The job identifier is 17.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: systemd-exit.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit UNIT has successfully entered the 'dead' state.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: Finished Exit the Session.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit UNIT has finished successfully.
-- 
-- The job identifier is 16.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[2046]: Reached target Exit the Session.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit UNIT has finished successfully.
-- 
-- The job identifier is 15.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[1]: user@0.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit user@0.service has successfully entered the 'dead' state.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[1]: Stopped User Manager for UID 0.
-- Subject: A stop job for unit user@0.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A stop job for unit user@0.service has finished.
-- 
-- The job identifier is 2110 and the job result is done.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[1]: Stopping User Runtime Directory /run/user/0...
-- Subject: A stop job for unit user-runtime-dir@0.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A stop job for unit user-runtime-dir@0.service has begun execution.
-- 
-- The job identifier is 2111.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[1]: run-user-0.mount: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit run-user-0.mount has successfully entered the 'dead' state.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[1]: user-runtime-dir@0.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit user-runtime-dir@0.service has successfully entered the 'dead' state.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[1]: Stopped User Runtime Directory /run/user/0.
-- Subject: A stop job for unit user-runtime-dir@0.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A stop job for unit user-runtime-dir@0.service has finished.
-- 
-- The job identifier is 2111 and the job result is done.
Jul 28 16:31:28 banjo.(Domain Redacted) systemd[1]: Removed slice User Slice of UID 0.
-- Subject: A stop job for unit user-0.slice has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A stop job for unit user-0.slice has finished.
-- 
-- The job identifier is 2113 and the job result is done.
Jul 28 16:31:37 banjo.(Domain Redacted) sshd[3073]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=(IP Address Redacted)  user=root
Jul 28 16:31:39 banjo.(Domain Redacted) sshd[3073]: Failed password for root from (IP Address Redacted) port 51741 ssh2
Jul 28 16:31:39 banjo.(Domain Redacted) sshd[3073]: Received disconnect from (IP Address Redacted) port 51741:11: Bye Bye [preauth]
Jul 28 16:31:39 banjo.(Domain Redacted) sshd[3073]: Disconnected from authenticating user root (IP Address Redacted) port 51741 [preauth]
Jul 28 16:31:40 banjo.(Domain Redacted) named[598]: client @0x7f65f400a550 (IP Address Redacted)#80 (pizzaseo.com): query (cache) 'pizzaseo.com/RRSIG/IN' denied
Jul 28 16:31:45 banjo.(Domain Redacted) named[598]: client @0x7f65f400a550 (IP Address Redacted)#80 (pizzaseo.com): query (cache) 'pizzaseo.com/RRSIG/IN' denied
Jul 28 16:31:55 banjo.(Domain Redacted) sshd[3215]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=(IP Address Redacted)  user=root
Jul 28 16:31:58 banjo.(Domain Redacted) sshd[3215]: Failed password for root from (IP Address Redacted) port 58038 ssh2
Jul 28 16:31:58 banjo.(Domain Redacted) sshd[3215]: Received disconnect from (IP Address Redacted) port 58038:11: Bye Bye [preauth]
Jul 28 16:31:58 banjo.(Domain Redacted) sshd[3215]: Disconnected from authenticating user root (IP Address Redacted) port 58038 [preauth]
Jul 28 16:31:58 banjo.(Domain Redacted) sshd[3226]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=(IP Address Redacted)  user=root
Jul 28 16:32:01 banjo.(Domain Redacted) sshd[3226]: Failed password for root from (IP Address Redacted) port 50276 ssh2
Jul 28 16:32:03 banjo.(Domain Redacted) sshd[3226]: Received disconnect from (IP Address Redacted) port 50276:11: Bye Bye [preauth]
Jul 28 16:32:03 banjo.(Domain Redacted) sshd[3226]: Disconnected from authenticating user root (IP Address Redacted) port 50276 [preauth]
Jul 28 16:32:08 banjo.(Domain Redacted) named[598]: client @0x7f65f80140d0 (IP Address Redacted)#80 (pizzaseo.com): query (cache) 'pizzaseo.com/RRSIG/IN' denied
Jul 28 16:32:09 banjo.(Domain Redacted) named[598]: client @0x7f65f80140d0 (IP Address Redacted)#80 (pizzaseo.com): query (cache) 'pizzaseo.com/RRSIG/IN' denied
Jul 28 16:32:16 banjo.(Domain Redacted) systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- An ExecStart= process belonging to unit mysql.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
Jul 28 16:32:16 banjo.(Domain Redacted) 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'.
Jul 28 16:32:16 banjo.(Domain Redacted) 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 1968 and the job result is failed.
Jul 28 16:32:16 banjo.(Domain Redacted) systemd[1]: Startup finished in 4.973s (kernel) + 5min 29.292s (userspace) = 5min 34.265s.
-- Subject: System start-up is now complete
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- All system services necessary queued for starting at boot have been
-- started. Note that this does not mean that the machine is now idle as services
-- might still be busy with completing start-up.
-- 
-- Kernel start-up required 4973789 microseconds.
-- 
-- Initial RAM disk start-up required INITRD_USEC microseconds.
-- 
-- Userspace start-up required 329292004 microseconds.
Jul 28 16:32:16 banjo.(Domain Redacted) systemd[1]: mysql.service: Scheduled restart job, restart counter is at 2.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Automatic restarting of the unit mysql.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Jul 28 16:32:16 banjo.(Domain Redacted) systemd[1]: Stopped MySQL Community Server.
-- 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 2114 and the job result is done.
Jul 28 16:32:16 banjo.(Domain Redacted) systemd[1]: Starting MySQL Community Server...
-- Subject: A start job for unit mysql.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit mysql.service has begun execution.
-- 
-- The job identifier is 2114.
Jul 28 16:32:16 banjo.(Domain Redacted) named[598]: client @0x7f65f400a550 (IP Address Redacted)#80 (pizzaseo.com): query (cache) 'pizzaseo.com/RRSIG/IN' denied
Jul 28 16:32:24 banjo.(Domain Redacted) sshd[3643]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=(IP Address Redacted)  user=root
Jul 28 16:32:24 banjo.(Domain Redacted) sshd[3649]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=(IP Address Redacted)  user=root
Jul 28 16:32:25 banjo.(Domain Redacted) sshd[3643]: Failed password for root from (IP Address Redacted) port 32919 ssh2
Jul 28 16:32:26 banjo.(Domain Redacted) sshd[3649]: Failed password for root from (IP Address Redacted) port 60526 ssh2
Jul 28 16:32:26 banjo.(Domain Redacted) sshd[3643]: Received disconnect from (IP Address Redacted) port 32919:11: Bye Bye [preauth]
Jul 28 16:32:26 banjo.(Domain Redacted) sshd[3643]: Disconnected from authenticating user root (IP Address Redacted) port 32919 [preauth]
Jul 28 16:32:27 banjo.(Domain Redacted) sshd[3649]: Received disconnect from (IP Address Redacted) port 60526:11: Bye Bye [preauth]
Jul 28 16:32:27 banjo.(Domain Redacted) sshd[3649]: Disconnected from authenticating user root (IP Address Redacted) port 60526 [preauth]
Jul 28 16:32:42 banjo.(Domain Redacted) named[598]: client @0x7f65f80140d0 (IP Address Redacted)#80 (pizzaseo.com): query (cache) 'pizzaseo.com/RRSIG/IN' denied
Jul 28 16:32:44 banjo.(Domain Redacted) named[598]: client @0x7f65f80140d0 (IP Address Redacted)#80 (pizzaseo.com): query (cache) 'pizzaseo.com/RRSIG/IN' denied
Jul 28 16:32:44 banjo.(Domain Redacted) named[598]: client @0x7f65f80140d0 84.64.16
Total output of 265.07 KiB was truncated at 97.65 KiB.

Looks like you have a user issue.

Do you have a mysql user?

awk -F’:’ ‘{ print $1}’ /etc/passwd

Also, who do you have listed as the user in the file:

/etc/mysql/mysql.conf.d/mysqld.cnf

Mine says user = mysql

Also, make sure your disk drive isn’t full

df -h

Also, if mysql is running it should be running as mysql

ps -aux | grep mysql

1 Like

Maybe I’m missing it, but I don’t see evidence of a user issue? But, I also don’t see why it isn’t starting. There must be another log, maybe in /var/log/mysql?

1 Like

Foremost, thanks @stuckinthehouse and @Joe for all the advice. While I added a mysql user for a manual install of WordPress on my machine, and it seemed like it may be the cause, I elected to first check my logs which were basically a repeat of:

021-07-28T05:11:31.575895Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.26-0ubuntu0.20.04.2) starting as process 3679524
2021-07-28T05:11:31.586448Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-07-28T05:12:10.435065Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-07-28T05:12:13.436727Z 4 [System] [MY-013381] [Server] Server upgrade from '80025' to '80026' started.
2021-07-28T05:12:51.222903Z 4 [ERROR] [MY-013178] [Server] Execution of server-side SQL statement '-- Copyright (c) 2015, 2021, Oracle and/or its affiliates. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; version 2 of the License. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -- NOTE: This needs to be replicated within the sys_config_clean.inc file INSERT IGNORE INTO sys.sys_config (variable, value) VALUES     ('statement_truncate_len', 64),     ('statement_performance_analyzer.limit', 100),     ('statement_performance_analyzer.view', NULL),     ('diagnostics.allow_i_s_tables', 'OFF'),     ('diagnostics.include_raw', 'OFF'),     ('ps_thread_trx_info.max_length', 65535); ' failed with error code = 1436, error message = 'Thread stack overrun:  12384 bytes used of a 131072 byte stack, and 160000 bytes needed.  Use 'mysqld --thread_stack=#' to specify a bigger stack.'.
2021-07-28T05:12:51.224420Z 0 [ERROR] [MY-013380] [Server] Failed to upgrade server.
2021-07-28T05:12:51.225515Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-07-28T05:12:52.794979Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.26-0ubuntu0.20.04.2)  (Ubuntu).

What particularly caught my eyes was: ('ps_thread_trx_info.max_length', 65535); ' failed with error code = 1436, error message = 'Thread stack overrun: 12384 bytes used of a 131072 byte stack, and 160000 bytes needed. Use 'mysqld --thread_stack=#' to specify a bigger stack.'. but attempting to specify a bigger stack didn’t worked so I did the following:

  1. Went to etc/mysql/mysql.conf.d/mysqld.cnf
  2. Manually changed the value of thread_stack
  3. Used sudo service mysql restart to restart the service.

This seems to have resolved the issue as the service appears to be running and sites that depended on a SQL db have returned. In my case, the resolution was simple and probably because I’m just an idiot, but either way my upmost gratitude again, @joe and @stuckinthehouse!

Oh no.

Try not to do that sort of thing in the future. If you find yourself following a guide on the internet from an “expert” that tells you to add system service users, install anything from a tarball or zip file, or otherwise get gritty with the system, RUN, do not walk, the other direction. They are trying to ruin your life, they are not trying to help you.

Edit: To be clear, the right way to install MySQL or MariaDB is to use a system package provided by your OS. If someone tells you to do anything other than apt-get install ... for installing system services like databases, web servers, whatever, that someone is almost certainly wrong and you shouldn’t listen to them. (And you can/should skip that step on a Virtualmin system because you already have a database and a web server, and if you go changing things behind Virtualmin’s back, without knowing what you’re doing and why, you’ll break something.)

2 Likes

“How to install Virtualmin?”

2 Likes

@Joe
Oops, to lend a bit of elucidation, I mean to say that it was a user I’ve since deleted that was added with permission to the SQL database under virtual server > Edit Users of a specific domain. I had installed WordPress a dozen times trying to isolate a particular issue.

Very good point though and some top notch information as always. Much appreciation and, again, apologies for leaving some info out there.

Oh, that’s fine. I thought you meant you’d added a system user for the mysql service (as there was some talk of that above), which would be a bad thing to do.

I thought the thread_stack default is 264KB. I hope that fixes it and something else doesn’t popup.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.