Home > Help Center > Shared Hosting > Databases > How to Backup MySQL Database using phpMyAdmin

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:

mysql database backup phpmyadmin

Expand the databases list:

mysql database backup phpmyadmin

Click on your WordPress site database (if you are in doubt check in wp-config.php):

mysql database backup phpmyadmin

Click Export:

mysql database backup phpmyadmin

Notice the Export Method section – the default option is Quick.

Click Go:

mysql database backup phpmyadmin

Click again Export and select Custom option in Export Method section:

mysql database backup phpmyadmin

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:

mysql database backup phpmyadmin

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:

mysql database backup phpmyadmin

So we need to delete all database tables first (not the database itself). Click Check All link and from the dropdown menu select Drop:

mysql database backup phpmyadmin

Confirm the deletion by clicking Yes button:

mysql database backup phpmyadmin

All database tables are deleted:

mysql database backup phpmyadmin

Now click on Import button, select the .sql archive on your computer and click Go:

mysql database backup phpmyadmin

The import is successful:

mysql database backup phpmyadmin

The website works fine.

mysql database backup phpmyadmin

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.

Select only *_posts table (your prefix is probably different), from the dropdown menu click Drop:

mysql database backup phpmyadmin

Click Yes to confirm deletion:

mysql database backup phpmyadmin

Refresh the site – all posts are gone:

mysql database backup phpmyadmin

Click Import , choose single table archive and click Go:

mysql database backup phpmyadmin

The archive is imported successfully:

mysql database backup phpmyadmin

Refresh the site again – all posts are visible again:

mysql database backup phpmyadmin

Summary

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

Still not finding what you're looking for?

Contact our support team with any additional questions or concerns.

Contact support