In cPanel you can import and export databases using the phpMyAdmin menu which you can find in the Databases section. Note, that only databases of 1 GB maximum can be imported/exported in phpMyAdmin. Larger databases should be imported/exported via SSH. To do this, follow the instructions here or simply submit a ticket to our HelpDesk.
Database import
1. Log into your cPanel
2. Navigate to the phpMyAdmin menu.
![](https://Namecheap.simplekb.com/SiteContents/2-7C22D5236A4543EB827F3BD8936E153E/media/phpmy1.png)
3. Select the database that you need to import:
![](https://Namecheap.simplekb.com/SiteContents/2-7C22D5236A4543EB827F3BD8936E153E/media/cp_php_admin1.png)
4. In the upper bar, click the tab Import:
![](https://Namecheap.simplekb.com/SiteContents/2-7C22D5236A4543EB827F3BD8936E153E/media/cp_php_admin2.png)
5. Click Browse and locate the .sql file in your computer. Once done, click Go:
![](https://Namecheap.simplekb.com/SiteContents/2-7C22D5236A4543EB827F3BD8936E153E/media/dbimport.png)
6. And you will see a notification that your database has been successfully imported:
![](https://Namecheap.simplekb.com/SiteContents/2-7C22D5236A4543EB827F3BD8936E153E/media/cp_php_admin4.png)
Database export
1. Log into your cPanel
2. Navigate to the phpMyAdmin menu:
![](https://Namecheap.simplekb.com/SiteContents/2-7C22D5236A4543EB827F3BD8936E153E/media/phpmy1.png)
3. Select the database you need to export:
![](https://Namecheap.simplekb.com/SiteContents/2-7C22D5236A4543EB827F3BD8936E153E/media/cp_php_admin1.png)
4. Choose the tables that you need to export or click Check All. Click Export to proceed:
![](https://Namecheap.simplekb.com/SiteContents/2-7C22D5236A4543EB827F3BD8936E153E/media/cp_php_admin5.png)
5. Select the required file from the drop-down menu in Format and click the Go button:
![](https://Namecheap.simplekb.com/SiteContents/2-7C22D5236A4543EB827F3BD8936E153E/media/cp_php_admin6.png)
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:
![how_to_import_and_export_database_in_cpanel_access_denied_create_database_db_name_error_and_how_to_fix it(10).jpg](https://Namecheap.simplekb.com/SiteContents/2-7C22D5236A4543EB827F3BD8936E153E/media/how_to_import_and_export_database_in_cpanel_access_denied_create_database_db_name_error_and_how_to_fix%20it%2810%29.jpg)
3. Save it and import it using the instructions provided above.
That's it!
Need any help? Contact our HelpDesk