Sep 15 2013

MySQL Database Import And Export Operations

Category: Administration,Backup And RecoveryFatih Acar @ 20:43

Take Backup With Data

Open Command Prompt (cmd)
# mysqldump -u dbusername -p db_name > /tmp/db_fullbackup.sql

Take Only Metadata Backup

# mysqldump -u dbusername -p –no-data db_name > /tmp/db_backupmetadata.sql
or
# mysqldump -u dbusername -p -d db_name > /tmp/db_backupmetadata.sql

Restore Database Metadata From Backup

# mysql -u dbusername -p db_name < /tmp/db_backupmetadata.sql

Restore Database From Backup

# mysql -u dbusername -p db_name < /tmp/db_fullbackup.sql

7,222 total views, 5 views today

Tags: Backup and Recovery, MySQL, MySQL Administration