web analytics

How to backup and restore a MySQL database using phpMyAdmin

May 11, 2022

PHPMyAdmin – the MySQL database management tool

phpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web. phpMyAdmin supports a wide range of operations on MySQL and MariaDB. Frequently used operations (managing databases, tables, columns, relations, indexes, users, permissions, etc) can be performed via the user interface, while you still have the ability to directly execute any SQL statement.

 Why should I backup MySQL databases with Indichosts.net?

A database is a storage place for dynamic content. Even if you have not changed your website HTML and pictures for some time, your database would have changed as your website script interacted with website visitors. It is very important to do a periodic backup of your database even if you have not changed your website for some time.

A lot of web applications use MySQL database(s) for storing the content. This can be blogs, shopping carts, content management systems, support systems, and most of the Fantastico scripts. You can check your hosting control panel to verify how many MySQL databases you are using.

We have PhpMyAdmin installed on our servers, accessible using graphical user interface (control panel) such as cPanel, DirectAdmin, Plesk and other opensource solutions. Please Open phpMyAdmin from the control panel assigned to you.

Create a Backup of the MySQL database

  • Select your database from the left panel (if you have multiple databases), Click Export in the Menu to get to where you can backup a MySQL database.

Click to enlarge


  • Make sure that you have selected to export your entire database and not just one table. There should be as many tables in the export list as shown under the database name.

  • Select “SQL”-> for the output format,   Then,

    • Check “Structure”.

    • Check the “Add AUTO_INCREMENT” value.

    • Check “Enclose table and field name with backquotes”.

    • Check “DATA”, check use “hexadecimal for binary field”.

    • Set Export type set to “INSERT”.


  • Now, Check “Save as file”, do not change the file name, and use compression if you want. Then click “GO” to download the backup file.

Click to enlarge


Restoring a backup of a MySQL database

  • To restore a database, Select your database from the left panel (if you have multiple databases), Click the SQL tab.

  • On the “SQL”-page, unclick the show query here again.

  • Browse to your backup of the database.

  • Click Go.

Click to enlarge

To read more about PhpMyAdmin, see the documentation.

web hosting

more reading

While phpMyAdmin is a GUI tool for MySQL, advanced users prefer to use Terminal, Console, or SSH to backup & restore MySQL databases. To learn how to backup and restore a MySQL database using click here.


Related Posts: