Differences

This shows you the differences between two versions of the page.

Link to this comparison view

faq:mysql04 [2011/04/30 17:38] (current)
clemens created
Line 1: Line 1:
 +<​code>​
 +[04] HOW DO I BACKUP OR RESTORE MY MYSQL DATABASE?
 +     
 +     To backup your MySQL database:
 +     ​------------------------------
 +     
 +     From any SDF system type:
 +     $ mysqldump -h ol -u $LOGNAME -p $LOGNAME > backup_file_name.sql
  
 +     Note: ol is the short name for the MySQL host system, ol.freeshell.org
 +     
 +     To restore your database from a dump file:
 +     ​------------------------------------------
 +
 +     From any SDF system type:
 +     $ mysql -h ol -u $LOGNAME -p $LOGNAME < backup_file_name.sql
 +
 +     ​Important Notes: ​ Backup and Restore differ in the following ways -
 +     
 +     To backup a MySQL database use the mysqldump command and the
 +     ​output redirector >
 +
 +     To restore a MySQL database use the mysql command and the
 +     input redirector <
 +</​code>​
 +
 +[[mysql|back]]