MySQL: BackUp – Restore DB (mysqldump)

mysql> show databases;

MySQL Export:
-------------
mysqldump -u root -p --databases myschema > /var/www/html/myschema/backup_db/MySchema_20101228.sql

MySQL Import:
-------------
mysql -u root -p --database myschema < /home/nista/myschema_temp/MySchema_20101228_1458.sql

MySQL Export just the schema:
------------------------------
mysqldump -u root -p --no-data myschema > /var/www/html/myschema/backup_db/MySchema_no-data_20101228.sql

Leave a Reply