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
or /var/log/mariadb/mariadb.log: [ERROR] Cannot open
.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.
./usr/sbin/mysqld: The table 'table name' does not exist.
Cause for Plesk failed to start mariadb
Tables in the mysql
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
3:Add the following to the my.cnf
file:
myskip-grant-tables
- In a text editor, open the
my.cnf
file. In this case, we’ll use the vi editor: - on CentOS/RHEL-based systems
vi /etc/my.cnf
- Distributions based on Debian/Ubuntu
vi /etc/mysql/my.cnf
- In the [mysqld] section, add the skip-grant-tables directive. To do this type in the following command line:
[mysqld]
skip-grant-tables - 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
5. Make a backup of the mysql
database:
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -uadmin --skip-extended-insert mysql > /root/mysql_dump.`date +%F.%s`.sql
6: Copy the mysql
directory to the /root
directory:
mv /var/lib/mysql/mysql/ /root
7: List all Plesk daily dumps that are accessible (the default dumps folder is /var/lib/psa/dumps
):
ls -lat `cat /etc/psa/psa.conf | grep DUMP_D | grep -v "#" | awk '{print $2}'`/mysql.daily.dump*
-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
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
9: Remove the already-included skip-grant-tables
directive.
10: Finally, start the MariaDB/MySQL service this clears the falling start mariadb error:
service mariadb restart
service mysql restart
[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