MySQL Backup/Restore

From Metro Studios Knowledgebase

Jump to: navigation, search

[edit] Backing-up a Database

Without compression:

mysqldump -u admin_user -p target_database > database_sql_dump.sql

With compression:

mysqldump -u admin_user -p target_database | bzip2 -c > database_sql_dump.sql.bz2

[edit] Restoring a Database

mysql -u admin_user -p target_database < database_sql_dump.sql

Personal tools
Namespaces
Variants
Actions
Wiki Navigation
Knowledgebase
Toolbox