Dark Launch

Import MySQL Backup; Restore .SQL Export

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

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

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

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

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

Code
$ mysql
mysql> show processlist;

Comments


  1. HHIS I sohlud have thought of that!