Import MySQL Backup; Restore .SQL Export

Import a mysql backup by doing the following on the command line:

mysql -u USERNAME -p -h SERVER DATABASE < "/path/to/backup.sql"

Replace USERNAME, SERVER, DATABASE and "/path/to/backup.sql".

mysql -u someuser -p -h mydatabase < "~/Desktop/mybackup.sql"

To view the status of the import, check the process list.

$ mysql
mysql> show processlist;
Did this help you? Please let me know with a comment. Thank you
Posted .

Comments (RSS)

Leave a comment