MySQL Database Recovery Tool by Stellar is designed to assist in resolving various issues that may occasionally arise while managing MySQL and MariaDB databases.
It can efficiently repair all inaccessible or corrupted database objects (tables, primary keys, views, triggers, etc.) created in the InnoDB and MyISAM MySQL database engines without altering or deleting the original databases.
MySQL versions 8.x, 6.x, 5.x, 4.x, and 3.x are compatible as of writing, and since itβs available for Windows, Ubuntu, and Red Hat-based distributions, you can easily recover your MySQL database on these systems. Otherwise, you can copy the MySQL data folder from an unsupported OS to either Windows or Linux, repair it, and move it back to the original OS.
After saving the repaired database in MySQL or MariaDB formats, this tool allows us to save it in various other file formats, such as SQL Script, CSV, HTML, and XLS, which can be crucial when repairing MySQL on a system without MySQL or MariaDB installed.
Pros & Cons
Pros | Cons |
---|---|
Available for Windows, Ubuntu, and Red Hat-based distributions. | Not available for macOS. |
Efficiently can repair the latest version of MySQL and MariaDB databases. | Itβs proprietary software. |
Export the database file in SQL script, CSV, HTML, and XLS file formats. | Itβs premium software with a free trial given, which can only perform repairs and display the repaired database but does not apply the changes. |
The βSave log reportβ option allows viewing and analyzing the log content later for forensic analysis. | The softwareβs license key is quite expensive compared to alternatives. |
A user-friendly interface that allows navigation and selection of the MySQL data directory for repairing corruption and applying necessary patches. | Itβs not completely ready for Linux systems. You might need to move your MySQL data folder to Windows for repair, as the Windows version of this tool works perfectly. |
How to Install MySQL Database Recovery Tool on Linux
Since itβs available for both Windows and Linux (especially Ubuntu and Red Hat-based distributions), Iβll show you the steps to install it on a Linux distribution.
So, start by navigating to its product page to download Stellar Repair for MySQL, select βLinuxβ, and then click on βFree Downloadβ (you can begin with the free version and activate it with a license key later).
Youβll be redirected to the Linux download page, where you can download the package file based on your Linux distribution type. For example, clicking the download button under βFor CentOS Redhatβ will download the β.rpm
β file, while βFor Ubuntuβ will download the β.deb
β file.
Once the file is downloaded, open your terminal, navigate to the β~/Downloads/
β directory, and execute one of the following commands according to your Linux distribution.
# Navigating to Downloads directory
$ cd ~/Downloads/
# Installation Command for Ubuntu-based distributions
$ sudo dpkg -i ./StellarRepairforMySQL-U.deb
# Installation Command for Red Hat-based distributions
$ sudo rpm -i ./StellarRepairforMySQL.rpm
When the installation is finished, you can launch the program by searching βRepair for MySQLβ in the Activity Overview.
Usage
When launched for the first time, it prompts you to provide the current logged-in username (auto-detected) and password. Before entering the credentials, make sure the logged-in user has sudo privileges to allow the program to perform repairs without interruption.
Once logged in, you will be presented with the dashboard where you can activate the program using a license key (which is only needed when you want to apply the changes), but for demonstration purposes, you can test it without a license key.
To achieve this, stop your MySQL services and copy the MySQL data folder, typically located at β/var/lib/mysql
β in Linux, to a safe location like your home directory for use as a backup.
$ sudo systemctl stop mysql
$ cp /var/lib/mysql $HOME/
Afterward, open the βMySQL Database Recovery Toolβ and click the βSelect Databaseβ option.
A prompt will pop up asking to select the relevant MySQL version and data folder. Since I use the latest MySQL version, I will select the βMySQL 8.xβ option and βprovide the path to the MySQL data folderβ that needs repair.
Next, you will see a list of databases detected by the program from the provided MySQL data folder path. Simply βSelect the database that needs repairβ and proceed by clicking the βRepairβ button.
Now, it will look for errors or corruption in the selected database, perform the necessary steps to recover it, and display a success message once completed.
Since the MySQL data folder that Iβve provided does not have any issues or corruption, it did not detect any errors, as shown in the log report below. However, in your case, it might be different.
When youβre done repairing, make sure to start the MySQL service.
$ sudo systemctl start mysql
How to Remove MySQL Database Recovery Tool from Linux
This article wouldnβt be complete without including the removal steps, so in the future, if you no longer need this tool, you can easily uninstall it from your system using the default package manager via the terminal.
# Removal Command for Ubuntu-based distributions
$ sudo apt remove stellarrepairformysql
# Removal Command for Red Hat-based distributions
$ sudo dnf remove stellarrepairformysql
Wrap Up
The Stellar MySQL Database Recovery Tool works perfectly on Windows, but I encountered difficulties using it on Linux. For instance, providing the MySQL data folder path and selecting the target database for repair resulted in an βEither incorrect path or no tables in the databaseβ error message.
At first glance, I thought it might be a database issue, but after some trial and error, I moved the data folder in Windows and repeated the same steps, which worked without issues. This suggests that the Linux version of this tool is not fully ready and requires a workaround to function properly.
Iβm still exploring this tool myself and will continue updating this article with new updates. If you have any questions or queries regarding the tool, feel free to ask them in the comment section.
Till then, peace!
tools is great but I found it too expensive :/