Click to See Complete Forum and Search --> : copy MySQL database from one PC to another
dataline
12-27-2006, 11:43 AM
Hi,
I've installed Apache/MySQL/PHP on my home PC and learning. I am also doing some PHP coding on another PC where I've also installed the same configuration. Is there a quick way to copy my MySQL database from my home PC to the other?
Thanks!
DL
NightShift58
12-27-2006, 12:35 PM
Take a look at: http://www.webyog.com
It's now Open Source and includes such a facility...
NogDog
12-27-2006, 01:12 PM
I believe that if going from Windows machine to Windows machine, you can simply copy the applicable directory from one machine to the other. It will be named something like:
c:\path\to\mysql\data\database_name.
vallonius
12-27-2006, 01:32 PM
I don't think copying the entire directory is advisable, though I forget the technical reasons.
Use mysqldump. http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html
NightShift58
12-27-2006, 01:51 PM
I don't know about Windows, as I've never tried it, but it certainly works under Linux, which leads me to believe that it will under Windows as well, as MySQL considers each directory to be a separate database.
bokeh
12-27-2006, 02:47 PM
I'll second SQLyog. I've got enterprise and it's excellent.
chazzy
12-27-2006, 04:37 PM
Definitely use SQLYog or mysqldump. Never copy directory structure. While it may work, it might not be exact.
dataline
12-29-2006, 10:20 AM
Thank you all for your replies and input!
I have tried what NogDog suggested (copy the data folder) and things are working fine. For now, that is! I am still learning; using 2 PCs for my PHPing (home and work - don't tell my boss .....)
Later on when I'm more comfortable, I will take a look at SQLYog / webyog that many of you suggested.
Thanks again!
And HAPPY NEW YEAR 2007 to all!
DL