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
MySQL/MariaDB fails to start owing to missing or corrupt tables in the ‘mysql’ records. The following error messages occur in:
/var/log/mysqld.log
Copy Code
or /var/log/mariadb/mariadb.log: [ERROR] Cannot open
Copy 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
mysql
Copy 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 stop
Copy Code
3:Add the following to the
my.cnf
Copy Code
file:
myskip-grant-tables
Copy Code
- In a text editor, open the
file. In this case, we’ll use the vi editor:my.cnf
Copy Code - on CentOS/RHEL-based systems
vi /etc/my.cnf
Copy Code - Distributions based on Debian/Ubuntu
vi /etc/mysql/my.cnf
Copy Code - In the [mysqld] section, add the skip-grant-tables directive. To do this type in the following command line:
[mysqld] skip-grant-tables
Copy 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 start
Copy Code
5. Make a backup of the
mysql
Copy Code
database:
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -uadmin --skip-extended-insert mysql > /root/mysql_dump.`date +%F.%s`.sql
Copy Code
6: Copy the
mysql
Copy Code
directory to the /root
Copy Code
directory:
mv /var/lib/mysql/mysql/ /root
Copy Code
7: List all Plesk daily dumps that are accessible (the default dumps folder is
/var/lib/psa/dumps
Copy 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.gz
Copy 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 db
Copy Code
9: Remove the already-included
skip-grant-tables
Copy Code
directive.
10: Finally, start the MariaDB/MySQL service this clears the falling start mariadb error:
service mariadb restart
service mysql restart
Copy 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.
var google_conversion_label = "owonCMyG5nEQ0aD71QM";
0 Comments