Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm pretty lost right now.

The RAID controller auf my server broke and all attached hard drives were corrupted. Luckily I copied the plain files off the server right before the crash (phew).

I set up the new server with Ubuntu 12.04 and a fresh mysql installation. I copied the backup off a server directly to the new one, without saving them to a windows machine (to prevent privileges errors).

My back up folder looks like this:

drwx------ 15 jensma jensma 4.0K Dec 12 18:09 .
drwxr-xr-x 76 jensma jensma 4.0K Nov 22 12:00 ..
drwx------  2 mysql  mysql  4.0K Nov 21 02:50 gamefilesenter
drwx------  2 mysql  mysql  4.0K Aug  5 00:17 circuitboard
-rw-r--r--  1 mysql  mysql     0 Oct 25 07:49 debian-5.5.flag
-rw-rw----  1 mysql  mysql   26M Dec 12 02:22 ibdata1
-rw-rw----  1 mysql  mysql  5.0M Dec 12 18:09 ib_logfile0
-rw-rw----  1 mysql  mysql  5.0M Dec 12 02:22 ib_logfile1
drwx------  2 mysql  mysql  4.0K Oct 25 07:49 mysql
-rw-rw----  1 mysql  mysql     6 Oct 25 07:49 mysql_upgrade_info
drwx------  2 mysql  mysql  4.0K Oct 25 07:49 performance_schema
drwx------  2 mysql  mysql  4.0K May 25  2013 phpmyadmin
drwx------  2 mysql  mysql  4.0K Jul  4 18:29 test
drwx------  2 mysql  mysql  4.0K May 19  2013 usr_web10_5

A folder contains data like this:

drwx------  2 mysql  mysql  4096 Aug  5 00:17 .
drwx------ 15 jensma jensma 4096 Dec 12 18:09 ..
-rw-rw----  1 mysql  mysql    65 Jul 10 15:04 db.opt
-rw-rw----  1 mysql  mysql  8620 Aug  1 23:38 stat.frm
-rw-rw----  1 mysql  mysql  8700 Aug  5 00:17 user.frm

I just copied the whole content to /var/lib/mysql and ran

sudo /usr/sbin/mysqld –innodb_log_file_size=5242880 –innodb_force_recovery=6

Well, the command kinda works - the shell shows up after half a minute. But the database is still empty :/

I'm pretty now to this. I do have full admin access to the server.

Any help is appreciated, thanks!

Edit 1:

ls -la /var/lib/mysql /var/lib/mysql/*

gives:

ls: cannot access /var/lib/mysql/*: No such file or directory
/var/lib/mysql:
total 36928
drwx------ 15 mysql mysql     4096 Dec 14 19:06 .
drwxr-xr-x 38 root  root      4096 Dec 14 18:07 ..
drwx------  2 root  root      4096 Dec 14 19:06 gamefilesenter
drwx------  2 root  root      4096 Dec 14 19:06 circuitboard
-rw-r--r--  1 root  root         0 Dec 14 19:06 debian-5.5.flag
-rw-rw----  1 mysql mysql 27262976 Dec 14 19:06 ibdata1
-rw-rw----  1 mysql mysql  5242880 Dec 14 19:06 ib_logfile0
-rw-rw----  1 mysql mysql  5242880 Dec 14 19:06 ib_logfile1
drwx------ 15 mysql root      4096 Dec 14 19:03 mysql
-rw-rw----  1 root  root         6 Dec 14 19:06 mysql_upgrade_info
drwx------  2 mysql mysql     4096 Dec 14 18:07 performance_schema
drwx------  2 mysql mysql     4096 Dec 14 19:06 phpmyadmin
drwx------  2 mysql root      4096 Dec 14 19:06 test
drwx------  2 root  root      4096 Dec 14 19:06 usr_web10_5

Edit 2:

A little update:

The databases are created, but empty. The users are created and their priviliges are applied correctly to the databases. No content, tough :(

share|improve this question
    
Show the output of ls -la /var/lib/mysql /var/lib/mysql/* please, and the mysql logs. –  Dennis Kaarsemaker Dec 14 '13 at 17:57
    
Sure, just a sec. Editing the first post. –  user3102695 Dec 14 '13 at 18:09
    
Updated info :) –  user3102695 Dec 14 '13 at 23:29
    
Did you copied files with mysql server stopped? –  lg. Jan 15 at 15:45

1 Answer 1

From what i see there is nor IDB (InnoDB database file) or my MYD (MyISAM database file), all you have is the db structure, frm files.

I think this guide can help you get your files back http://dba.stackexchange.com/a/57157

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.