Home
This text will be replaced
Database Backup with mysqldump PDF Print E-mail
Thursday, 31 January 2008
Mysqldump is a simple client used to backup MySQL databases or to transfer databases into another servers. It stores SQL statements to create tables and to import them. The client can also be used to create formatted files and generate XML files.

Example:

%> mysqldump -u username -p dbname > backup.sql
%> mysqldump -u username --all-databases > backup_all.sql

If you have a linux box, type the following command to get a complete help of mysqldump.

%> mysqldump --help | less


Backup and Compress at One

Pipelining gzip together with mysqldump in the command line is a quick and easy way to backup and to compress:

%> mysqldump -u username -p dbname | gzip > backup.gz


Restore the Backup

Use the following command to import a backup into an empty mysql database:

%> mysql -u username -p dbname < backup.sql

Or, if you have your backup zipped, you can use gunzip to unzip it and then use mysql to import:

%> gunzip < backup.gz | mysql -u username -p dbname
 
Prev   Next


Currency in Rupiah
Symbol Buy Sell
USD 9260.00 9140.00
AUD 8529.00 8307.00
GBP 13932.00 13670.00
JPY 103.99 100.41
EUR 12640.00 12392.00
Source www.bankmandiri.co.id
Compiled by www.acehonline.com

Main Menu
Home
Programming
How to
Puzzle-8
Web Developer
Technology from Intel
Technology from Y!
Linux Today
Polls
Which of the following topics you think relevant to be published at Acehonline.com
 
Visitors: 43726