How to Import and Export a Database with phpMyAdmin in cPanel
Last updated Changelog
phpMyAdmin is a tool for working with your MySQL databases in the browser. The two jobs people use it for most are importing a database (for example when moving a site to NameCrane) and exporting one (to take a copy or move it elsewhere). Both are a few clicks.
Warning: Importing adds to, or replaces, what’s in the database you choose. Make sure you’ve picked the right one, and export a copy first if it already has data you care about.
Before you start
- To import, you need an empty database to import into. See Create a database.
Import a database
-
Log in to cPanel. In the Databases section, click phpMyAdmin. It opens in a new tab, already logged in.

-
In the list on the left, click the database you want to import into.

-
Click the Import tab.

-
Under File to import, click Choose File and pick your
.sqlfile. Compressed files (.sql.gz,.sql.zip) work too. The maximum size is shown next to it.
-
Leave the other options as they are, scroll down and click Import.

-
phpMyAdmin shows Import has been successfully finished, with the number of queries it ran.

-
Your tables now appear under the database on the left. Click one to see its contents.

Export a database
-
Click the database in the left-hand list, then click the Export tab.

-
Leave Quick selected and the format as SQL, then click Export. Your browser downloads a
.sqlfile named after the database.
Tip: An exported database contains everything in it, including user accounts and email addresses for a WordPress site. Store it somewhere safe and don’t email it around.
Troubleshooting
| Problem | What to do |
|---|---|
| The file is too big to import | Compress it to .sql.gz first, which often makes it ten times smaller. If it’s still too big, contact support for help. |
| “#1044 - Access denied” or “CREATE DATABASE” errors | Your file tries to create its own database. Remove the CREATE DATABASE and USE lines from the top of the file, or ask whoever made the export to export just the tables. |
| “#1050 - Table already exists” | The database isn’t empty. Import into a new, empty database, or drop the existing tables first if you’re sure you don’t need them. |
| My site shows the old content after importing | Check your site’s settings (for WordPress, wp-config.php) point at the database you imported into. |
Snagged on something? Contact support and we’ll get you sorted.