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

How to import MySQL tables with phpMyAdmin

This guide shows you how to load tables and data from an SQL file into your database.

Databases2 min read10 steps

What is an import?

A database is where your website keeps its data. Tables are the parts inside it, like drawers in a cabinet. An import takes a saved file and puts its tables and rows into a database. The file is usually a .sql file made by an export or backup. phpMyAdmin is a web tool for databases, and you open it from cPanel.

Before you start

  • Have your .sql file ready on your computer. A zipped version (.zip or .gz) also works.
  • Have an empty database ready, or know which database to load into. Create one in cPanel under MySQL Databases if needed.
  • Warning: Tables with the same names may be replaced. Take a backup of the target database first.

Steps

  1. Log in to your client area. Open your hosting service and log in to cPanel.
  2. Under Databases, click phpMyAdmin.
  3. Click the target database in the left list.
  4. Click the Import tab at the top.
  5. Under File to import, click Choose File.
  6. Pick your .sql file.
  7. Keep the format set to SQL.
  8. Scroll down and click Go (or Import).
  9. Wait for the green success message.
  10. Look at the left list. Your tables should now appear.

If the file is too big

phpMyAdmin limits the upload size. If your file is too large, you will see an error. You have these choices:

  • Compress the file as .zip or .gz and try again.
  • Split the file into smaller parts and import them one by one.
  • Import from the command line with SSH, if your plan has it.
  • Ask Hostvento support to help with a big import. Open a ticket.

Common errors

  • Table already exists: drop the old table first, or import into an empty database.
  • Unknown collation or syntax error: the file came from a different MySQL version. Ask support or re-export with compatible settings.
  • Script timeout: the file is too big or slow. Use a smaller file.
Tip: Do not tick Partial import unless you need it. The default settings fit most cases.

Quick recap

  • Pick your database, click Import, choose the file, click Go.
  • Back up first, because same-name tables may be replaced.
  • Large files may need compression, splitting, or SSH.
  • Ask support if you get stuck.