Re: How to take Backup ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rinku

To dump (backup), I do the following:
/usr/local/mysql/bin/mysqldump -uroot -pyourpassword --opt --all-databases > ~/backup.sql


To restore, I do this:
cat ~/backup.sql | /usr/local/mysql/bin/mysql -uroot -pyourpassword

If you've dumped your databases in order to install a new version of MySQL, then your restore command won't need to include the -p flag, as the root password won't be set. Once you've restored the backup, go into MySQL and enter:
flush privileges;
at the prompt to reinstall your root password etc.


Hope that helps.

Cheers, DavidO.

On 2/07/2004, at 4:26 PM, Rinku wrote:

I want to take backup for Mysql database.

Can any of you tell me how to take Backup and how to Restore it ?

Rinku

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Dr David Orlovich,
Senior Lecturer in Botany.

Department of Botany,
University of Otago,
P.O. Box 56,
(Courier: 464 Great King Street)
Dunedin,
New Zealand.

Phone: (03) 479 9060
Fax: (03) 479 7583

Web: http://www.botany.otago.ac.nz/

Ecology, Conservation and Biodiversity Research Group: http://www.otago.ac.nz/erg/

Botanical Society of Otago: http://www.botany.otago.ac.nz/bso/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux