Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Fix a MySQL Import That Fails Because the File Is Too Big

If phpMyAdmin refuses your .sql file because it is too large, this guide shows several ways to get it imported.

Databases2 min read10 steps

Why does this happen?

A .sql file is a text file that holds a copy of a database. phpMyAdmin is a web tool for managing databases. When you import a file, it must upload through your browser first.

PHP, the language phpMyAdmin runs on, has size limits. Common limits are upload_max_filesize, post_max_size and max_execution_time. If the file is bigger than a limit, the import fails. You may see "file is too big" or a timeout message.

Take a backup of your current database before you import. An import can overwrite data.

Fix 1: Raise the PHP limits in cPanel

  1. Log in to cPanel.
  2. Open MultiPHP INI Editor in the Software section.
  3. Pick your domain, or use the editor in basic mode.
  4. Raise upload_max_filesize and post_max_size to more than your file size.
  5. Raise max_execution_time and memory_limit if needed.
  6. Click Apply.
  7. Try the import again.

Some hosting plans limit what you can raise. Ask Hostvento support if the values will not change.

Fix 2: Compress the file

  1. Zip or gzip the .sql file on your computer.
  2. In phpMyAdmin, choose the database and click Import.
  3. Pick the compressed file. phpMyAdmin can read .zip and .gz files.

Text files shrink a lot, so this often works.

Fix 3: Split the file

You can cut a huge file into smaller pieces using a free tool such as a SQL splitter. Import each piece one by one, in order.

Fix 4: Use the command line (SSH)

SSH lets you type commands on your server. Upload the file with FTP first, then run:

mysql -u db_user -p db_name < backup.sql

This reads the file straight into the database. Replace db_user, db_name and backup.sql with your own values. It will ask for the password. SSH access depends on your plan, so ask support if you do not have it.

Fix 5: Use the Import tool from a script

Some tools import big files in small pieces and avoid time limits. Ask support if you want help choosing one.

Tip: If the import stops halfway, empty the database or drop the half-made tables before you try again. This avoids "table already exists" errors.

Quick recap

  • The error comes from PHP upload and time limits.
  • Raise limits in MultiPHP INI Editor.
  • Compress or split the file.
  • For very big files, import with the mysql command over SSH.
  • Always back up first.