Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
recovering a mysql databse?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ahadley
n00b
n00b


Joined: 08 Jan 2004
Posts: 45
Location: UK

PostPosted: Wed Feb 16, 2005 9:37 am    Post subject: recovering a mysql databse? Reply with quote

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
View user's profile Send private message
j-m
Retired Dev
Retired Dev


Joined: 31 Oct 2004
Posts: 975

PostPosted: Wed Feb 16, 2005 9:55 am    Post subject: Reply with quote

Just copy the directories and files to new datadir... :wink:
Back to top
View user's profile Send private message
ahadley
n00b
n00b


Joined: 08 Jan 2004
Posts: 45
Location: UK

PostPosted: Wed Feb 16, 2005 10:13 am    Post subject: Reply with quote

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
View user's profile Send private message
j-m
Retired Dev
Retired Dev


Joined: 31 Oct 2004
Posts: 975

PostPosted: Wed Feb 16, 2005 10:18 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum