Backup and recovery in MySQL

by Selva 2008-03-12 18:01:20

MySQL is packed with many of utilities which simplifies the back-up and recovey.
BACK-UP:
The Utility used for Back-up any of database in mysql is ---'mysqldump'.We can make back-up even for single table
The following command is used for back-up:
> mysqldump -u [username] -p -h [hostname] [database-name (or) database-name.table-name] > [backup-file].sql

eg: > mysqldump -u root -p -h localhost db1.ta1 > db1.sql

RECOVERY:

The following command is used for Recovery:
> mysql -u [username] -p -h [hostname] [database-name (or) database-name.table-name] < [backup-file].sql

eg: > mysql -u root -p -h localhost db1.ta1 < db1.sql

Tagged in:

1660
like
1
dislike
0
mail
flag

You must LOGIN to add comments