LinuxMySQL/MariaDB

How To Mass Repair MySQL Databases Linux/cPanel Servers

It’s possible to repair MySQL databases from WHM and cPanel. You can also mass repair MySQL databases from the command line. If you have a busy server and have had an issue like you have run out of space it’s quite possible some databases might be corrupted and these will need to be repaired. This is especially true if you’re seeing a database connection error but nothing has changed recently on the server.

Repair a single database from WHM

If you have access to WHM you can repair MySQL/Maria databases from the Home »SQL Services »Repair a MySQL Database section. Just select the database from the list and hit repair. A report will be shown after the repair has been processed. It can take a while if your database is large.

Using PHPMyAdmin To Repair A Database

But, if you’re a cPanel High Availability Web Hosting customer it’s likely possible you don’t have access to the repair MySQL Database section in WHM. You can still repair a database but you use PHPMyAdmin. From cPanel click PHPMyAdmin and select the database on the left. Check all tables and from the dropdown box click repair. A report will be generated after the repair has been completed.

Mass Repair MySQL Databases Linux

You can also repair all databases on a cPanel server from the command line. Before running this command ensure you have enough free RAM, at least 1GB if you have large databases. From the command line as the root user enter;

mysqlcheck --all-databases -A

This command checks all MySQL and MariaDB databases on the cPanel server and also repairs them if any errors are found. Details of any repairs are displayed in the console.

That’s how to repair individual MySQL and Maria databases from WHM covered and how to repair your database if you only have access to cPanel covered. We’ve also covered how to repair all databases on a cPanel server

Related Articles

Leave a Reply

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

Back to top button