Restore MySQL Database from a backup

02 Dec 2007
Posted by editor

SSH into your server if you are working remotely. Create an empty database

mysql -u username -p -e 'CREATE DATABASE database

Now use the following command from your ssh session

mysql -u username -p database < path/to/backup.sql

 

Trackback URL for this post:

http://www.zygmund.net/trackback/16
Tags: