"Manny" <ma******@hotmail.com> wrote in message
news:3e*************************@posting.google.co m...
My website uses php/mysql/linux and is hosted by a local web-hosting
company. I access the db via cpanel/phpmyadmin and currently perform
all testing and changes on the live db and website ( not good!).
I would like a copy of the db on my own machine at home so I can test
locally rather than on the live db.
I have successfully installed mysql at home (on windows) and now I'd
like to get a copy of the db and data and would like to put this on my
db at home.
How is this possible?
Check out the [mysqldump] utility that comes with your myslql/linux.
This will let you output the sql text that will create the database, all
it's tables and indices, and insert all the data. You will:
1) mysqldump -u{usr} -p{pwd} {dbname} > sql.txt # create the text
dump
2) Move sql.txt to your local (windows) computer
3) mysql -u{usr} -p{pwd} < sql.txt
I don't *think* you need to sweat the Linux/Microsoft <lf>/<cr><lf> line
termination thingy since this should all be just whitespace to MySQL. My
knowledge of the MS side of things is getting shakey. Hopefully, someone
else will jump in if I missed something.
Thomas Bartkus