How to import a database in cPanel (phpMyAdmin)

First create an empty database and user: databases in cPanel.

  1. Open "phpMyAdmin" (group "Databases").
  2. Select the database on the left.
  3. Open the "Import" tab.
Database in phpMyAdmin
Database in phpMyAdmin
  1. Under "File to import", click "Choose File" and pick the dump: .sql, .sql.gz or .sql.zip.
  2. Keep the character set utf-8 and the format SQL.
  3. Click "Import" at the bottom of the page.
Importing a dump
Importing a dump

After the import, the tables appear on the left.

Common errors

ErrorWhat to do
#1044 Access denied ... to databaseThe dump contains CREATE DATABASE or USE with another database name. Remove these lines from the top of the file.
#1227 Access denied; you need SUPER privilegeThe dump contains DEFINER=`user`@`host`. Remove DEFINER from the dump or export again without it.
File too large / upload breaksCompress the dump to .gz. If it still fails, contact support and we will load it.

Importing into a database that already has tables can overwrite data. Export the current database first: database export.

Questions and answers
Remove the CREATE DATABASE and USE lines with another database name from the top of the dump and import again.
Compress it to .sql.gz. If it still fails, contact support.