Overview
This article explains how to import a database or table using phpMyAdmin.
Prerequisites
- This article assumes you have already created a database in your DreamHost panel. It's not possible to create a database via SSH.
- To import the backup file, you'll need your database credentials. See this article to learn more about how to find your database credentials.
Importing a database or table
In the following steps, make sure to select either your database or table .sql file in step #4.
Please note the following when importing:
- A single table — You can only import a table if it does not exist in the current database. If the table does exist, an error is thrown and the import will not complete.
- A database — You can only import database content into a database that has already been created in the panel and is currently empty.
- Log into phpMyAdmin.
- Select the destination database on the left pane.
- Click the Import tab in the top center pane.
- Under the File to import section, click Browse and locate the file with the .sql extension you wish to import.
- Check or uncheck the boxes for Partial import and Other options.
- From the Format dropdown menu, choose SQL.
- Click the Go button at the bottom to import the database.
Your new database or table displays in the left menu of phpMyAdmin.
What if the file is too large to import via phpMyAdmin?
If the .sql file you're trying to import is larger than phpMyAdmin allows, the only other option is to import via SSH. See this article for more information.