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
.sqlfile ready on your computer. A zipped version (.zipor.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
- Log in to your client area. Open your hosting service and log in to cPanel.
- Under Databases, click phpMyAdmin.
- Click the target database in the left list.
- Click the Import tab at the top.
- Under File to import, click Choose File.
- Pick your
.sqlfile. - Keep the format set to SQL.
- Scroll down and click Go (or Import).
- Wait for the green success message.
- 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
.zipor.gzand 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.