How to Backup MySQL Database using phpMyAdmin
phpMyAdmin is the most popular MySQL administration tool. It provides a convenient Graphical User Interface (GUI) for working with MySQL database management system.
In this tutorial we'll show you how to backup and restore MySQL database using phpMyAdmin.
For this example we'll create backup for a WordPress site and then will restore the database from the same archive.
Go to CPanel > Databases and click phpMyAdmin icon:
Expand the databases list:
Click on your WordPress site database (if you are in doubt check in
Notice the Export Method section – the default option is Quick.
Click again Export and select Custom option in Export Method section:
Now you are provided with many advanced configuration options. One of them is to backup a single database table. Make changes here only if you feel enough confident.
At the bottom of the screen click Go button.
You can create backup of a single table if you click on the table name and then click Export:
If you try to import now the backup file you'll get an error because the database archive will conflict with the existing database tables:
So we need to delete all database tables first (not the database itself). Click Check All link and from the dropdown menu select Drop:
Confirm the deletion by clicking Yes button:
All database tables are deleted:
Now click on Import button, select the .sql archive on your computer and click Go:
The import is successful:
The website works fine.
We are going to show you how to restore single database table – generally the process is exactly the same.
This time we are going to delete only one table and then import the single table backup we created earlier.
*_posts table (your prefix is probably different), from the dropdown menu click Drop:
Click Yes to confirm deletion:
Refresh the site – all posts are gone:
Click Import , choose single table archive and click Go:
The archive is imported successfully:
Refresh the site again – all posts are visible again:
Following these steps you can create and restore backup not only for WordPress site but for any MySQL application.
Export MySQL backup:
- Select database
- Click Export to save .sql backup on the local computer
Import MySQL backup:
- Select database
- Delete database tables
- Click Import and choose the correct backup .sql file from your computer.
#mysql #database #apps #management