Lindy dB.16 Jan 2024Updated 16 Jul 2025Web Hosting2 min read

How to Import and Export a Database via phpMyAdmin

On this page

In the cPanel, you can easily import and export databases using the phpMyAdmin menu which you can find in the Databases section.

Please note, that only databases of 1 GB maximum can be imported/exported in phpMyAdmin. Larger databases should be imported/exported via SSH, you can use this guide.

Database Import

1. Log into your cPanel
2. Navigate to the phpMyAdmin menu.

cPanel Databases section with phpMyAdmin highlighted

3. Select the database that you need to import:

phpMyAdmin with a database selected in the left-hand database list

Note that: The left area where you see all the database lists will differ from what you will see on your end. It will be based on what you have created.

4. In the upper bar, click the tab Import

phpMyAdmin Structure view with the Import tab marked in the top bar

5. Click Browse and locate the .sql file on your computer. Once done, click Go

phpMyAdmin import screen with the Browse button and the Go button marked

6. Afterward, you will see a notification that your database has been successfully imported

phpMyAdmin banner reporting that the import finished successfully

Database Export

1. Log into your cPanel
2. Navigate to the phpMyAdmin menu

cPanel Databases section with phpMyAdmin highlighted

3. Select the database you need to export

phpMyAdmin with a database selected in the left-hand database list

4. Choose the tables that you need to export or click Check All. Click Export to proceed

phpMyAdmin table list with Check All ticked and the Export tab marked

5. Select the required file from the drop-down menu in Format and click the Go button

phpMyAdmin export screen with the Quick method selected and the format set to SQL

Access Denied - Create Database db_name Error. How to fix it?

If you receive this error message, you can resolve the issue by following the steps below:

1. Open the dump of your database using any text editor on your computer (for instance, Notepad or WordPad).
2. Find the line: CREATE DATABASE db_name (it can usually be found at the beginning) and remove it.
*db_name – your database name:

SQL dump open in a text editor with the CREATE DATABASE line highlighted

3. Save it and import it using the instructions provided above.

 

Please contact us if you need any help

Ready to put your site online?

Fast, reliable web hosting with free migrations and 24/7 support.

Avatar for Lindy dB.

Lindy dB.

The Author

Lindy brings over 7 years of experience in SEO, web development, UI/UX design, and marketing to the table, with a special focus on the hosting industry. When not geeking out over the latest digital trends, you can find Lindy buried in a good book or exploring worlds in video games.