How to Export and Import Databases with phpMyAdmin

This post explains how to use cPanel and phpMyAdmin to export and import MySQL and MariaDB databases, common in most WordPress setups. phpMyAdmin is an open-source, web-based tool for managing databases. The process includes exporting the database for backup or migration, storing its content, then importing it onto the same or different host if needed.…

We showed students and new users steps to export and import MySQL and MariaDB databases a few days ago. Today’s post uses cPanel and phpMyAdmin to accomplish the same goal.

Since most WordPress setups use MySQL or MariaDB databases, this post applies to those settings. As long as phpMyAdmin can connect to the database, it doesn’t matter what the database server is; you should be able to use the tool to get the job done.

For those who don’t know what phpMyAdmin is, it is an open-source web-based tool that allows anyone to easily manage MySQL, MariaDB, and other databases from their web browsers. Instead of trying to understand SQL queries, use your web browsers to manage the databases.

Exporting MySQL or MariaDB database

Exporting WordPress databases is crucial for someone migrating or backing them up. When you’re backing up your databases, you export them. You can then import those databases when needed in times of trouble.

To export a database using phpMyAdmin, log on to cPanel (your host provider should give you access to cPanel), navigate to the databases section, and select phpMyAdmin, as shown in the image below.

After clicking the phpMyAdmin link, it should take you to a page with all your databases on the left. First, select the database you wish to export, then choose Export from the top menu and the Go button highlighted in the image below.

Doing that should open a dialog box for you to choose a location to store the database content. Once the content is stored, you can put it somewhere to keep it safe or move it to another host and import it. This is how one exports databases using phpMyAdmin.

Import MySQL or MariaDB database

Now you know how to export databases via phpMyAdmin. Let’s go and import the database we just exported. You may want to import MySQL or MariaDB databases because your website was compromised, and you want to restore your database, an error that caused your website not to function, and many others.

When you find yourself in similar situations, your best bet is to restore your databases by importing them onto the same or a different host.

To import a database, you first create a blank database using the same name as the one exported. Then open phpMyAdmin and select the empty database, click Import from the top menu, browse for the database file you’re importing, and click the Go button.

Doing this will import and restore the database that was exported earlier.

That’s it! This is how to export and import databases using phpMyAdmin.

Enjoy!

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *