Page 1 of 1

Copy a MySql Database

Posted: Thu Sep 08, 2005 5:11 pm
by hansteam
I have a MySQL Database on my domain hansteam.net that I need to move to my client's domain at halfpricetools.ca for a client. hansteam.net uses plesk and halfpricetools.ca uses cpanel. I've basically started coding a method of taking all of the information out of the first database but I'm still having to code the creation of the tables in the second database. If anybody here has a solution that involves a copy and paste more or less, i'd be very interested to hear of it!

Posted: Thu Sep 08, 2005 5:25 pm
by Burrito
dump the database structure and data using phpMyAdmin or the like then paste it to your new target using the same.

I've had to do this many times in the past and on a few occasions with extremely large databases. In those cases I had to break it into chunks and paste and execute small(er) amounts of data at a time.

with older versions of MySQL, you could simply grab three files and copy them from one machine to another, but I have not tried that with anything newer than ~Dec 2002.

Posted: Thu Sep 08, 2005 5:42 pm
by hansteam
Thanks a lot, that was really helpful. I would have wound up wasting A LOT of time on coding all of this. i don't know why I haven't used this program before, but I guess you learn a new thing every day :D

Posted: Fri Sep 09, 2005 1:29 pm
by voltrader
If the db is really big, dump as a file and upload using bigdump. It's faster than cutting and pasting ad nauseum.