Find out how to restore MySQL databases
Here you will find out:
- how to restore MySQL database with command line
- how DiskInternals can help you
Are you ready? Let's read!
About restoration of MySQL databases
Most modern site management systems and other similar systems use MySQL.
This database is part of the foundation on which the entire Internet is based. That is why backups of all your accumulated information are so important.
This article will cover all the basic methods of restoring a MySQL database.
Method 1. Use mysqldump with the command line
The mysqldump utility is free and preinstalled. It is designed to create backups. It can be one, several selected, or all available databases for any unforeseen event or for transferring databases to another server.
The command to create a backup of a mySQL database is as follows:
Note:
u - computer administrator name
p - administrator password
databases - the name of one or more databases for the dump. To back up several databases, just list their names after the option --databases (-B):
*To create a backup copy of all available databases, you need to use the --all-databases option or its abridged version: -A.
Method 2. Use MySQL Recovery to restore the database
DiskInternals MySQL Recovery is a professional application, designed for restoring MySQL databases, for experienced database administrators. Here you can fix corrupt databases in the following file systems: NTFS, FAT, and ReFS. It is also possible to restore inaccessible InnoDB databases.
The application is equipped with two scanning modes:
- In case of accidental deletion of databases' files - click "recover database from disk" button.
- In case of more complex situations, such as corrupted database - click "repair existing database" button.
Tables, text files and images found during scanning can be previewed before restoration.
Another feature of the software is the support for any national character sets, including the Unicode table.
How to restore MySQL databases step-by-step
After downloading the software and installing it on your computer, open DiskInternals MySQL Recovery and click on the Wizard icon.
Then select one of the following:
- recover MySQL database
- restore the database from a disk
Next, the scanning phase begins, which will end when you see the Finish button.
Click on it and browse the available databases and tables.
Now the last step is saving. A Recovery Wizard is also provided for this, which will offer you all the possible places for export. However, to do this you must purchase a license for MySQL Recovery.