Updated: 22 October 2026 · Applies to: phpMyAdmin 5.2 and MariaDB 11.8 (tested on Debian 13); cPanel phpMyAdmin limits from cPanel documentation (version 124 and later)
To import a database in phpMyAdmin, select the empty target database in the left panel, open the Import tab, choose your .sql file under Browse your computer and click Import. Most failures come from a file larger than the upload limit, a slow import that hits the time limit, or statements in the file (database names, collations, DEFINER users) that do not match the new server. Each one is covered below with the exact error and the fix.
Import a .sql file with phpMyAdmin
- Create the database and its user first. In cPanel this is MySQL Databases; cPanel adds your username as a prefix, so a database called
wpbecomesUSERNAME_wp. - Open phpMyAdmin (in cPanel, under Databases) and click the new database in the left panel.
- Click the Import tab. Check that the heading names the database you just selected.
- Under File to import:, click Browse your computer and pick the file. The Max: value next to it is the largest file you can upload. The file may be plain SQL or compressed with gzip, bzip2 or zip.
- Leave Character set of the file at utf-8 and Format at SQL unless you know the dump is different.
- Click Import at the bottom of the page and wait for the green success message.
If something goes wrong, phpMyAdmin shows the server's error under MySQL said:, for example #1044 - Access denied .... Find the number below.
File too large: "You probably tried to upload a file that is too large"
phpMyAdmin may also say "No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration." Both mean the file is over the Max: limit.
- Compress the file with gzip or zip before uploading. The limit applies to the uploaded file, and SQL dumps usually shrink a lot.
- On your own VPS or dedicated server with WHM: cPanel's phpMyAdmin runs on cPanel's internal PHP, not your website's PHP version. According to cPanel, raise cPanel PHP max upload size (default 50 MB) and cPanel PHP max POST size (default 55 MB) in WHM, Tweak Settings, PHP tab. Both accept values up to 2,047 MB.
- Very large databases: import from the command line instead, which has no upload limit. See Import and Export a MySQL or MariaDB Database (Command Line).
"Script timeout passed, if you want to finish import, please resubmit the same file and import will resume"
The import ran longer than PHP allows. Choose the same file again and click Import: phpMyAdmin continues where it stopped, as long as Allow the interruption of an import in case the script detects it is close to the PHP timeout limit was ticked under Partial import (it is by default). On a WHM server, the matching setting is cPanel PHP max execution time (default 90 seconds, up to 500) in Tweak Settings. For big imports the command line is faster and does not time out.
#1044 - Access denied for user ... to database 'olduser_wp'
The file contains CREATE DATABASE and USE lines with the old database name, and your user may only use its own databases. Our lab dump stopped at the first line:
Output:
ERROR 1044 (42000) at line 23: Access denied for user 'alice_wp'@'localhost' to database 'olduser_wp'
Remove those lines, then select your new database in phpMyAdmin and import again. With SSH access you can do it with one command (it edits backup.sql in place, so keep a copy):
sed -i -e '/^CREATE DATABASE/d' -e '/^USE `/d' backup.sql
Next time, export without the database statement. phpMyAdmin's database export leaves Add CREATE DATABASE / USE statement unticked by default; mysqldump or mariadb-dump adds these lines when you use --databases, so dump a single database without that option.
#1049 - Unknown database
The file says USE a database that does not exist on this server, or you started the import without selecting a database. Create the database in cPanel's MySQL Databases, select it in the left panel, and import again. If the file still names the old database, remove its USE line as above.
#1007 - Can't create database ...; database exists
The file tries to create a database that is already there. Remove the CREATE DATABASE line with the command above and import into the existing database.
#1050 - Table ... already exists
The target database already has tables with the same names, usually from an earlier attempt. Import into an empty database, or drop the old tables first if you are sure you do not need them. Dumps exported with DROP TABLE statements replace existing tables automatically.
#1227 - Access denied; you need (at least one of) the ... privilege(s)
Views, triggers and stored routines in the dump carry a DEFINER that names the old database user. Only an administrator can create objects for another user. The privilege named in the message depends on the server version; on MariaDB 11.8 our test showed:
Output:
ERROR 1227 (42000) at line 81: Access denied; you need (at least one of) the SET USER privilege(s) for this operation
Remove the DEFINER clauses so the objects belong to your own user, then import again:
sed -i 's/DEFINER=`[^`]*`@`[^`]*`//g' backup.sql
In our test the view imported correctly afterwards.
#1273 - Unknown collation
The dump uses a collation that the new server does not know. Two common cases:
utf8mb4_0900_ai_cicomes from MySQL 8. MariaDB 11.8 accepted it in our test (according to MariaDB, support arrived in 11.4.5), but older MariaDB versions stop with #1273.utf8mb4_uca1400_ai_ciis the default in new MariaDB 11 dumps (our MariaDB 11.8 dump used it), and MySQL does not know it.
Replace the collation with one both servers support, for example:
sed -i 's/utf8mb4_0900_ai_ci/utf8mb4_unicode_ci/g' backup.sql
Use the same command with utf8mb4_uca1400_ai_ci in place of utf8mb4_0900_ai_ci for the second case.
#1064 - You have an error in your SQL syntax
The file is not plain SQL, is damaged, or was cut off during download. Check the first lines: a real dump starts with SQL comments and statements, not HTML or binary data.
head -n 20 backup.sql
If you uploaded a compressed file, make sure it really is gzip, bzip2 or zip (phpMyAdmin cannot unpack other formats such as RAR). Take a fresh export if the file is incomplete.
Related guides
- How to import database via phpMyAdmin in cPanel?
- How can I backup a database using phpmyadmin?
- Import and Export a MySQL or MariaDB Database (Command Line)
Official documentation: cPanel Tweak Settings, PHP and MariaDB error codes.