Import a database
1
Open phpMyAdmin
Log in to cPanel through your client area or at
yourdomain.com/cpanel. Go to Databases and click phpMyAdmin.2
Select the target database
Click the database you want to import into from the left sidebar. If you haven’t created one yet, go back to cPanel and use MySQL Databases to create it first.
3
Import the file
Click the Import tab at the top, then click Browse to select your
.sql file. Leave the default settings and click Go.phpMyAdmin has a file size limit for imports. For larger databases, import via SSH instead:
Export a database
1
Open phpMyAdmin
In cPanel, go to Databases and click phpMyAdmin.
2
Select the database
Click the database you want to export from the left sidebar.
3
Export
Click the Export tab. For most cases, the Quick method with SQL format works fine. Click Go to download the
.sql file.Fix “Access denied CREATE DATABASE” errors
This error happens when your.sql file contains a CREATE DATABASE statement. On shared hosting, your cPanel user doesn’t have permission to create databases through SQL — you create them through cPanel instead.
To fix it:
- Open the
.sqlfile in a text editor. - Find and delete the
CREATE DATABASEline (usually near the top). Also remove anyUSE database_name;line if present. - Save the file and import it again, making sure you’ve selected the correct database in phpMyAdmin first.