This shows you the differences between two versions of the page.
— | faq:mysql04 [2011/04/30 17:38] (current) – created clemens | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | < | ||
+ | [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 | ||
+ | |||
+ | | ||
+ | |||
+ | To backup a MySQL database use the mysqldump command and the | ||
+ | | ||
+ | |||
+ | To restore a MySQL database use the mysql command and the | ||
+ | input redirector < | ||
+ | </ | ||
+ | |||
+ | [[mysql|back]] |