phpMyAdmin: manage, import and export a database
phpMyAdmin is the tool, available from cPanel, that lets you see the content of a MySQL database, save it to a file and import data back into it. This article shows how to export a database, import one and cope with a file that is too large.
Before you start
- You have a database (see the article "Create a MySQL database and its user in cPanel").
- For an import, you have a backup file, usually with the
.sqlextension. phpMyAdmin also accepts compressed files (gzip, bzip2, zip), provided the name ends in.sql.zip,.sql.gzor.sql.bz2. - Export the database before any import: an import can change or replace existing data, and it is hard to go back without a backup.
- Create databases and users in cPanel, not in phpMyAdmin. The cPanel documentation warns that phpMyAdmin does not register them properly, which breaks backups and restores.
Open phpMyAdmin
In cPanel, under "Databases", click phpMyAdmin. The tool opens with your databases in the left-hand column. Click the name of the database to work on: the Export and Import tabs for that database appear at the top.

Export a database (backup)
- In phpMyAdmin, click the database in the left-hand column, then the Export tab.
- Keep the Export method: Quick (it shows only the minimal options). Choose "Custom" only if you want to export some tables or compress the file.
- Leave the Format on SQL.
- Click Go. Your browser downloads a
.sqlfile. Keep it somewhere safe.
Import a database or tables
- Click the destination database in the left-hand column, then the Import tab. According to the phpMyAdmin documentation, the import goes into the database that is open when you click the tab.
- Under File to import, click Browse your computer and choose your file. You can also drag it onto the page.
- Leave the format on SQL (the default). Keep the proposed character set, unless your file was created with another encoding.
- Click Go at the bottom of the page. Wait for the confirmation message: do not close the page before.
Expected result
After an export, you have a .sql file on your computer. After an import, phpMyAdmin shows a success message and the tables from the file appear under the database, in the left-hand column.
If something goes wrong
- The file is too large. Next to "Browse your computer", phpMyAdmin shows the maximum accepted size. It depends on the PHP settings on the server (
upload_max_filesize,post_max_size,memory_limit,max_execution_time), as the phpMyAdmin documentation explains. You can compress the file to.sql.zipor.sql.gz, or export it as several smaller files, using the "Custom" method, which shows all the options. If that is not enough, contact support. - The import stops halfway. This is often the maximum execution time. Split the file into parts and import them one after the other.
- A table already exists. The file tries to create a table with the same name. Delete the existing table after a backup, or import into an empty database.
- A table's size does not change after a deletion. The cPanel documentation notes that on MySQL 8 and later, table statistics are cached: phpMyAdmin may show the old size.
FAQ
How do I open phpMyAdmin in cPanel? In the "Databases" section of cPanel, click "phpMyAdmin". Your host must have enabled it for your account.
How do I import an SQL file that is too big?
Compress it (.sql.zip, .sql.gz), or split it into several files. If the limit is still too low, ask support.
Can I create a database in phpMyAdmin? It is not recommended: create it in cPanel, otherwise your account's backups and restores will not take it into account.
What is the difference between "Quick" and "Custom" when exporting? "Quick" exports the whole database with few options. "Custom" shows all the options: tables to include, compression, content.
Going further
Your sites and databases run on a cPanel space: see our web hosting.