LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 12-09-2006, 05:31 AM   #1
MrSako
Member
 
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 05:45 AM.
 
Old 12-09-2006, 07:59 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,805

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

Quote:
# The following section has been taken from
# the original MySQL init script
basedir=/usr
datadir=/var/lib/mysql
mysql_daemon_user=mysql
mysql_daemon_group=mysql
pid_file=/var/lib/mysql/mysqld.pid
socket=/var/lib/mysql/mysql.sock
MYADMIN=/usr/bin/mysqladmin
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, 03:42 PM   #3
MrSako
Member
 
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
 
  


Reply


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 10:35 AM
Restoring *.sql database from Linux Fedora's shell marciano Linux - Newbie 1 10-19-2005 07:05 PM
Restoring MySQL backups with mysql-administrator pnellesen Programming 0 04-25-2005 10:53 AM
Restoring MYSQL database without SSH shell access hct224 Linux - Newbie 5 01-08-2004 07:14 AM
restoring mysql databases? and mysql permissions... armegeden Linux - Software 0 03-13-2003 12:04 PM


All times are GMT -5. The time now is 04:08 PM.

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