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 └─migrated-from-my.cnf-settings.conf Active: failed (Result: exit-code) since Sun 2019-12-01 21:13:21 +04; 32min ago Docs: man:mysqld(8) https://mariadb.com/kb/en/library/systemd/ 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 1004gourmet.com systemd: Starting MariaDB 10.3.18 database server... Dec 01 21:13:15 1004gourmet.com mysqld: 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 1004gourmet.com systemd: mariadb.service: Main process exited, code=exited, status=1/FAILURE Dec 01 21:13:21 1004gourmet.com systemd: mariadb.service: Failed with result 'exit-code'. Dec 01 21:13:21 1004gourmet.com systemd: 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)
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!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!