MySQL dump & restore

mysqldump to create a simple backup of database.Here we are using mysqldump to backup database ‘db‘ to dumb.sql
#mysqldump -u  root  -p  db  >dumb.sql
This will ask for root password.After entering the root password database ‘db’ dump into dump.sql
To back up all databases , we could  use  –all-databases option instead of dbname,so
#mysqldump -u root -p –all-databases > all_dump.sql

To restore this dump.sql back to database,we could use the following command
#mysql -u root -p db <dump.sql

VN:F [1.9.17_1161]
Rating: 4.8/10 (4 votes cast)
VN:F [1.9.17_1161]
Rating: -2 (from 2 votes)
MySQL dump & restore, 4.8 out of 10 based on 4 ratings

Related Posts

  • No Related Post
Related Posts with Thumbnails

About the Author

CoreTimer

has written 31 stories on this site.

System administrator(Linux/UNIX/Windows) RHCE,MCP,CCNA

Write a Comment

Copyright © 2012 CoreTimer.com|System Admin’s Reference. All rights reserved.

Switch to our mobile site