LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 09-23-2006, 11:02 AM   #1
dbc001
Member
 
Registered: Jan 2004
Distribution: Slackware, Ubuntu
Posts: 97

Rep: Reputation: 15
Question mysql disaster recovery?


I have recently had a hardware failure on my mysql server. i've got a new machine ready to take it's place, but i never had a chance to do a mysqldump of my data. i have access to all the hard drives from the old machine - how can i pull the mysql data off the old drives? where does mysql store databases by default in slackware?

i've tried to google search for this but all i get are guides about how to do a mysqldump - and ads for companies that do data recovery. i wasn't able to do a dump - what do i do now?

thanks in advance!
dbc
 
Old 09-23-2006, 11:17 AM   #2
Aeiri
Member
 
Registered: Feb 2004
Posts: 307

Rep: Reputation: 30
Quote:
Originally Posted by dbc001
I have recently had a hardware failure on my mysql server. i've got a new machine ready to take it's place, but i never had a chance to do a mysqldump of my data. i have access to all the hard drives from the old machine - how can i pull the mysql data off the old drives? where does mysql store databases by default in slackware?

i've tried to google search for this but all i get are guides about how to do a mysqldump - and ads for companies that do data recovery. i wasn't able to do a dump - what do i do now?

thanks in advance!
dbc
The directory "/var/lib/mysql" is where the data for the databases are stored for mysql, if I'm not mistaken.
 
Old 09-24-2006, 02:16 PM   #3
dbc001
Member
 
Registered: Jan 2004
Distribution: Slackware, Ubuntu
Posts: 97

Original Poster
Rep: Reputation: 15
ok... looks like it's kind of working. i moved all the files to the new server, and phpmyadmin lists all the databases and tables. but i get database errors when i try to use the data. for example, when I browse to the wordpress database and click the wp_posts table on the left side, I get this error:
Quote:
Error

SQL query:

SHOW INDEX FROM `wp_posts` ;

MySQL said:
#1017 - Can't find file: './wordpress/wp_posts.frm' (errno: 13)
if i browse to /var/lib/mysql all the files seem to be there:
Quote:
/var/lib/mysql# ls -al wordpress/
total 412
drwxr-xr-x 2 root root 4096 2006-09-24 13:21 ./
drwxr-x--- 10 mysql mysql 4096 2006-09-24 13:55 ../
-rw-rw---- 1 root root 65 2006-09-17 21:09 db.opt
-rw-rw---- 1 root root 48 2006-09-17 21:15 wp_categories.MYD
-rw-rw---- 1 root root 3072 2006-09-21 12:02 wp_categories.MYI
-rw-rw---- 1 root root 8822 2006-09-17 21:11 wp_categories.frm
-rw-rw---- 1 root root 224 2006-09-17 21:15 wp_comments.MYD
-rw-rw---- 1 root root 4096 2006-09-18 11:20 wp_comments.MYI
-rw-rw---- 1 root root 9295 2006-09-17 21:11 wp_comments.frm
-rw-rw---- 1 root root 112 2006-09-17 21:18 wp_linkcategories.MYD
-rw-rw---- 1 root root 2048 2006-09-21 12:02 wp_linkcategories.MYI
-rw-rw---- 1 root root 9120 2006-09-17 21:11 wp_linkcategories.frm
-rw-rw---- 1 root root 660 2006-09-17 21:20 wp_links.MYD
-rw-rw---- 1 root root 4096 2006-09-21 12:02 wp_links.MYI
-rw-rw---- 1 root root 9134 2006-09-17 21:11 wp_links.frm
-rw-rw---- 1 root root 191804 2006-09-18 08:06 wp_options.MYD
-rw-rw---- 1 root root 8192 2006-09-21 12:02 wp_options.MYI
-rw-rw---- 1 root root 9063 2006-09-17 21:11 wp_options.frm
-rw-rw---- 1 root root 50 2006-09-17 21:15 wp_post2cat.MYD
-rw-rw---- 1 root root 3072 2006-09-19 13:34 wp_post2cat.MYI
-rw-rw---- 1 root root 8644 2006-09-17 21:11 wp_post2cat.frm
-rw-rw---- 1 root root 76 2006-09-17 21:15 wp_postmeta.MYD
-rw-rw---- 1 root root 5120 2006-09-21 12:02 wp_postmeta.MYI
-rw-rw---- 1 root root 8682 2006-09-17 21:11 wp_postmeta.frm
-rw-rw---- 1 root root 776 2006-09-17 21:15 wp_posts.MYD
-rw-rw---- 1 root root 3072 2006-09-21 12:02 wp_posts.MYI
-rw-rw---- 1 root root 9729 2006-09-17 21:11 wp_posts.frm
-rw-rw---- 1 root root 764 2006-09-17 21:14 wp_usermeta.MYD
-rw-rw---- 1 root root 5120 2006-09-21 12:02 wp_usermeta.MYI
-rw-rw---- 1 root root 8684 2006-09-17 21:11 wp_usermeta.frm
-rw-rw---- 1 root root 220 2006-09-17 21:14 wp_users.MYD
-rw-rw---- 1 root root 3072 2006-09-21 12:02 wp_users.MYI
-rw-rw---- 1 root root 8968 2006-09-17 21:11 wp_users.frm
am i missing something?

dbc
 
Old 09-24-2006, 02:23 PM   #4
dbc001
Member
 
Registered: Jan 2004
Distribution: Slackware, Ubuntu
Posts: 97

Original Poster
Rep: Reputation: 15
a little more progress - if I go to /var/lib/mysql and do chown -R mysql wordpress/ that lets phpmyadmin access the database, but wordpress still can't get to it...
 
Old 09-24-2006, 02:27 PM   #5
Voltar
Member
 
Registered: Jan 2006
Location: Bakersfield, California
Distribution: CentOS 5.3, FreeBSD 7.2, Fedora 11
Posts: 83

Rep: Reputation: 15
I had a similar issue to this once, but I don't use Slackware packages for MySQL so my data was in a different place.

After I had copied all the MySQL data to the new machine, I got errors until I re-chmod'd and chgrp'd the data directory's contents to the correct owner. Right now it seems that only root can read/write those wp_* files, so that might be the problem.
 
Old 09-24-2006, 02:39 PM   #6
dbc001
Member
 
Registered: Jan 2004
Distribution: Slackware, Ubuntu
Posts: 97

Original Poster
Rep: Reputation: 15
Still no luck:
Quote:
/var/lib/mysql# chmod -R 660 wordpress/
/var/lib/mysql# chown -R mysql wordpress/
/var/lib/mysql# chgrp -R mysql wordpress/
I still get errors trying to access my databases, except from phpmyadmin. there must be another step that i'm missing...

Last edited by dbc001; 09-24-2006 at 03:11 PM.
 
Old 09-24-2006, 03:28 PM   #7
dbc001
Member
 
Registered: Jan 2004
Distribution: Slackware, Ubuntu
Posts: 97

Original Poster
Rep: Reputation: 15
At this point I think my problem is more MySQL than it is slackware. I've posted my remaining problem here: http://www.linuxquestions.org/questi....php?p=2436225

cheers,
dbc

ps thanks for your help Voltar & Aeiri!
 
  


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
Disaster Recovery?, what to do? Motaro Linux - General 3 11-03-2005 03:04 PM
Disaster Recovery souperdad Linux - General 4 11-10-2004 02:11 PM
Disaster Recovery Suggestions kemplej Slackware 8 06-30-2004 01:28 PM
Disaster Recovery Analyst sphelpspsi AIX 1 05-04-2004 09:54 AM
disaster recovery steps AZDAVE Mandriva 5 04-16-2004 10:13 AM


All times are GMT -5. The time now is 09:41 AM.

Main Menu
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