This article explains how to import the following:
- A single table (that does not exist) into a database (that already exists in the panel)
- All database content into an empty database (that already exists in the panel)
You must first create the database in your DreamHost panel before importing content.
It's not possible to create a database via SSH.
Importing a 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.
Importing a database
You can only import database content into a database that has already been created in the panel and is currently empty.
Locating your database credentials
View the following article for details on how to find your login credentials and log into phpMyAdmin:
This article assumes the database already exists in your DreamHost panel.
Import or restore a database or table
- Log into phpMyAdmin.
- Select the destination database on the left pane.
- Click on 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.
If you imported a database, all tables will show when selecting the database in the left panel of phpMyAdmin.
If you imported a table, the newly-imported table will appear in the list of tables.
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. View the following article for instructions: