View previous topic :: View next topic |
Author |
Message |
ahadley n00b
Joined: 08 Jan 2004 Posts: 45 Location: UK
|
Posted: Wed Feb 16, 2005 9:37 am Post subject: recovering a mysql databse? |
|
|
Hi,
I have recently had to set up a new server as my last was compromised, i have the old root partition mounted on the fresh machine (noexec, read) so i can get the websites back, and so i can check the old config and such but was wondering how i can retrieve my old database since i no longer have the old mysql server running?
I cant do a sqldump from the old one for obvious reasons, and so was wanting to know if mysql keeps an importable version of it i could simply grab from the old machine. (i have backups but they are a fews days out of date as when the server started to die this included the backups for some reason).
Thanks in advance,
Alex _________________ Common sense is the collection of prejudices acquired by age eighteen.
Albert Einstein |
|
Back to top |
|
|
j-m Retired Dev
Joined: 31 Oct 2004 Posts: 975
|
Posted: Wed Feb 16, 2005 9:55 am Post subject: |
|
|
Just copy the directories and files to new datadir... |
|
Back to top |
|
|
ahadley n00b
Joined: 08 Jan 2004 Posts: 45 Location: UK
|
Posted: Wed Feb 16, 2005 10:13 am Post subject: |
|
|
lol, okay, fair enough... but what i was wondering was what i need to copy (and from where), as i dont want to copy all mysql stuff across since i am going to do a fresh install on the new server.
Thanks for replying j-m, always on hand and helpful on this forum!
p.s. i searched for 'datadir' on the old disk, but to no avail... apologies for the simpleton questions! _________________ Common sense is the collection of prejudices acquired by age eighteen.
Albert Einstein |
|
Back to top |
|
|
j-m Retired Dev
Joined: 31 Oct 2004 Posts: 975
|
Posted: Wed Feb 16, 2005 10:18 am Post subject: |
|
|
ahadley wrote: | lol, okay, fair enough... but what i was wondering was what i need to copy (and from where), as i dont want to copy all mysql stuff across since i am going to do a fresh install on the new server.
Thanks for replying j-m, always on hand and helpful on this forum!
p.s. i searched for 'datadir' on the old disk, but to no avail... apologies for the simpleton questions! |
Search for datadir in old my.cnf. Copy stuff from that directory to datadir on new server. There are only databases in this directory, you need to copy all the stuff in this directory. The default location is /var/lib/mysql on Gentoo. |
|
Back to top |
|
|
|