Table ‘mysql.user’ doesn’t exist error in Plesk causing trouble? We have a solution for you.
At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Service.
Let’s take a look at how our Support Team recently helped out a customer with the Table ‘mysql.user’ doesn’t exist error in Plesk.
How to resolve Table ‘mysql.user’ doesn’t exist error in Plesk
In some scenarios, MySQL service fails to start and often results in an error message in the /var/log/mysql/error.log file. This error message helps us narrow down the root cause behind the error and come up with an appropriate solution.
If we come across the error shown below, it clearly indicates that the MySQL system database is corrupt or missing.
Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
Our Support Techs recommends the following steps to resolve this specific error:
- First, we have to connect to the Plesk server through SSH.
- Next, we have to modify my.cnf file with the help of these steps:
- On CentOS or RHEL based distributions:
# vi /etc/my.cnf
- On Debian or Ubuntu-based distributions:
# vi /etc/mysql/my.cnf
- On CentOS or RHEL based distributions:
- Then we will add the following line under the [mysqld] section as seen below:
[mysqld] skip-grant-tables <...>
- Next, we will save the changes and close my.cnf file.
- After that, we have to restart the MySQL or MariaDB service with these commands:
# systemctl restart mysql
# systemctl restart mariadb
- Then, we will switch to the directory containing the daily dumps:
# cd /var/lib/psa/dumps
- Here we will restore the database with the help of the latest daily dump:
# zcat mysql.daily.dump.0.gz | sed -n '/-- Current Database: `mysql`/,/-- Current Database:*/p' | plesk db
- Next, we have to remove the skip-grant-tables directive from step 2.
- Finally, we have to restart the MySQL or MariaDB service with these commands:
# systemctl restart mysql
# systemctl restart mariadb
[Seeking a solution to another query? We have your back..]
Conclusion
To sum up, the skilled Support Engineers at Bobcares demonstrated how to resolve Table ‘mysql.user’ doesn’t exist error in Plesk.
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.
0 Comments