mysql server stop working suddenly

I have installed litespeed wordrpress droplet, But today suddenly mysql stop working and error showing establish connection database, when i try to check the mysql status it show

● mariadb.service - MariaDB 10.3.18 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
   Active: failed (Result: exit-code) since Sun 2019-12-01 21:13:21 +04; 32min ago
     Docs: man:mysqld(8)
  Process: 4272 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  Process: 4193 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR
  Process: 4185 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 4176 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
 Main PID: 4272 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

Dec 01 21:13:15 systemd[1]: Starting MariaDB 10.3.18 database server...
Dec 01 21:13:15 mysqld[4272]: 2019-12-01 21:13:15 0 [Note] /usr/sbin/mysqld (mysqld 10.3.18-MariaDB-1:10.3.18+maria~bionic) starting as process 4272 ...
Dec 01 21:13:21 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Dec 01 21:13:21 systemd[1]: mariadb.service: Failed with result 'exit-code'.
Dec 01 21:13:21 systemd[1]: Failed to start MariaDB 10.3.18 database server.

I also forgot the root password of mysql to take backup of database, when i try to change the root password in safemode sql is shows below error:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


Just an update for anyone who may be interested.: The disk increasing issue was due to unusually large log files under /var/log/journal/ which can be fixed by following this post. And cache files under /usr/local/lsws/cachedata. In general you shouldn’t need to worry about it, cache file will still be recreated once purged/expired. So it’s possible happens when you have bunch of items. In this case, if you don’t have enough disk space, then you will want to use cronjob method to cleanup to release the disk space temporary. FYI. auto cleanup expired cache data is on dev’s to-do.

The DB corrupt issue, happens because sometimes tc.log may be genreated in a crash, and the DB is recovered after you removed it. It’s not exactly our area of expertise unfortunately.

Best, Eric

Hi @web1004 ,

It seems like a DB issue, have you tried to start the mariadb yet? What about disk status, is it full?

You can find the default SQL root password file path from SSH welcome banner.

You can still send a support request to for a quick check with this post link appended.

Best, Eric