How to install and use Database Corruption Diagnostic add-on?

How to install and use the Database Corruption Diagnostic add-on?

The Database Corruption Diagnostic add-on works with MySQL, MariaDB, and Percona databases, including different cluster setups. It helps find file corruption by checking the integrity of the cluster’s indexes, tables, and databases.

The supported stacks for corruption diagnostic include standalone setups and various cluster configurations based on MariaDB, MySQL, and Percona stacks, such as Primary-Secondary and Galera Cluster.

Database Corruption Add-On Installation

You can add the diagnostic tool in two ways: automatically during the cluster installation or by doing it yourself from the Marketplace.

Here, we’ll explain how to add this tool from the Marketplace.

Step 1: Select the Database Corruption Diagnostic tool by visiting the Marketplace’s Add-Ons section.

Database Corruption Diagnostic add-on

Step 2: In the installation window that pops up, enter the needed information:

User and Password: the admin credentials for the database

Environment name: choose the environment with the right database cluster from the options

Nodes: pick the layer with the database cluster

Configure Database Corruption Diagnostic

Step 3: Click “Install” and wait for a minute as the add-on installs. You’ll see a message on the screen confirming the successful installation of the Database Corruption Diagnostic.

Successfully Installed

Add-on usage

Step 1: You’ll find the Database Corruption Diagnostic add-on in the Add-On tab for the database layer.

Add-on Tab

Step 2: Click the Corruption Diagnostic button to check your database.

Note: This will temporarily pause the database services, so be prepared for some downtime before confirming.

Confirmation

Step 3: In a few minutes, you’ll get the diagnostic results in a pop-up notification, including a link to the /var/log/db_recovery.log file for more details. Click the “Show Logs” option to check the log.

Show Logs

Once clicked, the log file will open, allowing you to check the database recovery log.

Database recovery log

If corrupted data is detected, restoring your database from a backup is recommended. You can use the Backup/Restore add-on to schedule regular backups, ensuring you always have a backup available in an emergency.

Conclusion:

In conclusion, installing and using this add-on is straightforward. Add it during cluster installation or manually from the Marketplace. Run the diagnostic with a click, wait for results, and if needed, restore from backups using the Backup/Restore add-on for added safety.