How to Import Database Copy Into New Database Using SSH

Here’s the SSH command to import a database backup to a new database.

Navigate to the directory where your database copy resides using SSH.

mysql -uusername -p databasename < backupname.sql

You’ll be prompted for the password for the database. Enter that.

If this is a Magento database, it could take awhile to import. Ours is around 600M, so it took awhile.

That’s it.

You must be logged in to post a comment.