View Full Version : MySQL backup using mysqldump
I am trying to backup my MySQL db using mysql dump. I want to backup the db to my local machine as a text file, so I can restore the db if it dies. I have read many tutorials and other posts cencerning the topic but I can't seem to get it working.
Can anyone please post the exact commands to do this. I'm connecting to the db from command line using the mysql utility that came with my Windos download.
Thanks!
HalfaBee
3-15-03, 09:31 PM
From the command line do
mysqldump --opt -n -hserver.powweb.com -uyourusername -pyourpassword yourDBname > dbdata.sql
You can also do this on the server if you want to keep a backup there.
HalfaBee
Thank you very much for the reply.
I typed exactly what you said (replacing the username, password, servername) and received an SQL syntax error.
Any ideas?
-------------------
HalfaBee
3-16-03, 05:43 AM
Dont do this in mysql.
Do it from a dosprompt.
HalfaBe
timothy1090
3-17-03, 10:46 AM
here's an easy way to do a dump, and freeware to boot
http://www.webattack.com/get/mysqlsnap.shtml
Bad Hair Day
3-17-03, 02:00 PM
Originally posted by batmite
I want to backup the db to my local machine as a text file, so I can restore the db if it dies
Check out the thread below:
It will save a text file for you, and manage your DB quite efficiently from what I've seen so far.
BHD
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.