How to Import a Database Using phpMyAdmin
Importing a database is a common task when migrating a website to dotCanada, restoring a backup, or setting up a development environment. phpMyAdmin makes it straightforward to import a .sql file directly through your browser. This guide walks you through the process step by step.
Before You Begin
- Make sure you have a
.sqlor.sql.gz(compressed) database export file ready on your computer. - Create a new database in cPanel (and a user with full privileges) before importing. See the articles on creating a MySQL database and database user for instructions.
- Note the maximum upload file size shown in phpMyAdmin. For files larger than this limit, you may need to import via the command line or use JetBackup if it is a dotCanada backup.
Steps to Import a Database
- Log in to your cPanel account and open phpMyAdmin from the Databases section.
- In the left panel, click on the name of the database you want to import into. Make sure you select the correct database - importing will add or overwrite data.
- In the main panel, click the Import tab.
- Under File to Import, click Choose File and select your
.sqlor.sql.gzfile from your computer. - Leave the other settings at their defaults unless you have a specific reason to change them. The character set should be utf8 or utf8mb4 for most modern websites.
- Scroll down and click Import (or Go) to begin the import.
After the Import
phpMyAdmin will display a success message once the import is complete, along with a summary of the SQL statements executed. You can then browse the tables in the left panel to confirm your data has been imported correctly.
Troubleshooting
- File too large: Compress the file as
.gzand try again, or contact our support team for assistance with large imports. - SQL errors: Errors during import are often caused by character encoding mismatches or importing into a database that already has conflicting tables. Our team is happy to help troubleshoot.
If you need help importing your database, please contact our support team and we will assist you promptly.
100% Satisfaction Guarantee
We're so confident you'll love dotCanada that we offer a 30-day money-back guarantee. Not satisfied? Get a full refund, no questions asked.
Ready to Get Started?
Join thousands of Canadian website owners who trust dotCanada for reliable, fast web hosting.
Get Started Today
