Can someone help me with a MySQL issue?

notfred

Lifer
Feb 12, 2001
38,241
4
0
I need to copy a database from one machine to another. I currently have a windows machine with a database called "contact" and a linux box with basically a fresh install of MySQL on it. What's the best way to get the contact database onto the linux box?
 

yllus

Elite Member & Lifer
Aug 20, 2000
20,577
432
126
Shutdown the MySQL service on both sides and do a straight file copy, I think. All the files from /data/contact/ to the corresponding directory on the new machine.
 

damiano

Platinum Member
May 29, 2002
2,322
1
0
the datafile in mysql is ONE file (i forgot what type)
you just need to copy it from machine to the other (wether they are windows or linux...)
and restart the mysql daemon on the unix machine and it should pick up the database by itself
I will research to find what is the file type of the datafile for you

keep me posted

Damiano
 

damiano

Platinum Member
May 29, 2002
2,322
1
0
or you can do a dump (mysqldump --tab=/path/to/some/dir --opt --full)

if you choose the option of copyiing, the files you have to copy are of the type (`*.frm', `*.MYD' and `*.MYI' files), as long as the server isn't updating anything.

cheers

Damiano
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
I'm trying the straight copy. I'm restarting the linux box (I made some changes to the startup scripts, too, and thought I'd test that) now.
 

damiano

Platinum Member
May 29, 2002
2,322
1
0
cool

good luck

keep us posted if it works
and send an ip in which we can telnet if you need a hand :)
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
It worked, that was easy enough :)

I don't think I could give you an IP to telnet to anyway, as I'd probably get fired for giving you access to a government computer :)
 

damiano

Platinum Member
May 29, 2002
2,322
1
0
Originally posted by: notfred
It worked, that was easy enough :)

I don't think I could give you an IP to telnet to anyway, as I'd probably get fired for giving you access to a government computer :)


was just trying to help, not to hack :)
congrats...
cheers

Damiano