Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-09-2006, 04:31 AM   #1
Registered: May 2006
Distribution: CentOS 4.4
Posts: 185

Rep: Reputation: 30
restoring mysql database

i had a situation where supposively my VPS (virtual private server) that i rent was compromised and used to send phishing emails by someone. so the people who host it shut off my vps, and they backed up all the information on it and required that the vps be "rebuilt"

well its great that i have a backup of the whole server, but i dont know how to get my mysql data back, its somewhere within the whole backup (itsa backup of the whole file system)

how can i copy this over to my newly installed mysql 5 server?

edit: btw there is no /usr/local/mysql directory as alot of google results siad there would be. it was installed using Yum on CentOS4.

edit again: there seems to be stuff inside /var/lib/mysql which maybe is the same thing where google results talked about /usr/local/mysql but im not sure. any help is appreciated, thanks

edit a third time: can i just copy over the .frm and other files in the directires like that into their respective directories on my new server? or will it not work like that? - it seems to be working but is there any possible issues that arent easily visible in result of doing this?

Last edited by MrSako; 12-09-2006 at 04:45 AM.
Old 12-09-2006, 06:59 AM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,891

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
In my installation of MySQL (SuSE 9.3 Pro), in /etc/init.d/mysql, the file contains this information:

# The following section has been taken from
# the original MySQL init script
You should have a similar file somewhere in /etc. Notice the 'datadir' line. It will tell your where your databases are stored.

Remember, this is on my system. Your system may be set up differently.
Old 12-09-2006, 02:42 PM   #3
Registered: May 2006
Distribution: CentOS 4.4
Posts: 185

Original Poster
Rep: Reputation: 30
well i found the files in /var/lib/mysql just i dont know how to use the files to insert into my new database. just copying turns out to not work


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Restoring MSSQL database backup into PSQL mandrivaLE2005 Linux - Software 4 01-26-2006 09:35 AM
Restoring *.sql database from Linux Fedora's shell marciano Linux - Newbie 1 10-19-2005 06:05 PM
Restoring MySQL backups with mysql-administrator pnellesen Programming 0 04-25-2005 09:53 AM
Restoring MYSQL database without SSH shell access hct224 Linux - Newbie 5 01-08-2004 06:14 AM
restoring mysql databases? and mysql permissions... armegeden Linux - Software 0 03-13-2003 11:04 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:03 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration