Bobcares

Plesk Failed to Start MariaDB: Easy Solution

by | Nov 4, 2022

Let us examine the error Plesk failed to start mariadb. At Bobcares our Server management support services will give you a complete guide on resolving the error.

Symptoms for the Plesk failed to start MariaDB error

plesk failed to start mariadb

MySQL/MariaDB fails to start owing to missing or corrupt tables in the ‘mysql’ records. The following error messages occur in:

/var/log/mysqld.logCopy Code
or
/var/log/mariadb/mariadb.log: [ERROR] Cannot openCopy Code
.Or it may occur in the lock privilege tables:
fatal error Incorrect file format 'table name' [ERROR] Cannot open or lock privilege tables: fatal error 'table name' does not exist.Copy Code
.
/usr/sbin/mysqld: The table 'table name' does not exist.Copy Code

Cause for Plesk failed to start mariadb

Tables in the

mysqlCopy Code
database are either missing or damaged.

Error Solution

1: Firstly, Use SSH to connect to the Plesk server.

2: After that, we can choose to stop the MariaDB/MySQL service by typing  in the following command line:

service mariadb stop
service mysql stopCopy Code

3:Add the following to the

my.cnfCopy Code
file:

myskip-grant-tablesCopy Code
  • In a text editor, open the
    my.cnfCopy Code
    file. In this case, we’ll use the vi editor:
  • on CentOS/RHEL-based systems
    vi /etc/my.cnfCopy Code
  • Distributions based on Debian/Ubuntu
    vi /etc/mysql/my.cnfCopy Code
  • In the [mysqld] section, add the skip-grant-tables directive. To do this type in the following command line:
    [mysqld]
    skip-grant-tablesCopy Code
  • Save the changes and exit the program.

4. Start the MariaDB/MySQL service by typing in the following command line. This is the next step to clear the Plesk failed to start error:

service mariadb start
service mysql startCopy Code

5. Make a backup of the

mysqlCopy Code
database:

MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -uadmin --skip-extended-insert mysql > /root/mysql_dump.`date +%F.%s`.sqlCopy Code

6: Copy the

mysqlCopy Code
directory to the
/rootCopy Code
directory:

mv /var/lib/mysql/mysql/ /rootCopy Code

7: List all Plesk daily dumps that are accessible (the default dumps folder is

/var/lib/psa/dumpsCopy Code
):

ls -lat `cat /etc/psa/psa.conf | grep DUMP_D | grep -v "#" | awk '{print $2}'`/mysql.daily.dump*Copy Code
-rw------- 1 root root 236253 Dec 3 01:51 /var/lib/psa/dumps/mysql.daily.dump.0.gz
-rw------- 1 root root 229653 Jul 2 01:48 /var/lib/psa/dumps/mysql.daily.dump.1.gz
-rw------- 1 root root 222485 Apr 1 01:56 /var/lib/psa/dumps/mysql.daily.dump.2.gzCopy Code

8: Restore MySQL from the most recent Plesk daily dump:

zcat /var/lib/psa/dumps/mysql.daily.dump.0.gz | sed -n '/-- Current Database: `mysql`/,/-- Current Database:*/p' | plesk dbCopy Code

9: Remove the already-included

skip-grant-tablesCopy Code
directive.

10: Finally, start the MariaDB/MySQL service this clears the falling start mariadb error:

service mariadb restart
service mysql restartCopy Code

[Need assistance with similar queries? We are here to help]

Conclusion

To sum up we have now learned how to resolve the Plesk failed to start mariadb error. We have learned to solve the error by the steps put forth by our server management support services.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Speed issues driving customers away?
We’ve got your back!