Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Fist of all I have the files but the old system is gone.

I took the folders in /var/lib/mysql/ and gave then the permissions the mysql folder that was in there had. user mysql group root only accessible my user.

Now when I want to access my localhost sites I get a mysql database error. But I think everything is as it was before. What do I need to do to make this work?

Cannot find or open table blabla/wp_options from
the internal data dictionary of InnoDB though the .frm file for the
table exists. Maybe you have deleted and recreated InnoDB data
files but have forgotten to delete the corresponding .frm files
of InnoDB tables, or you have moved .frm files to another database?
or, the table contains indexes that this version of the engine
doesn't support.
See http://dev.mysql.com/doc/refman/5.5/en/innodb-troubleshooting.html
how you can resolve the problem.

the logfile shows me a hell of a lot errors like this. Should I delete this .frm files now?

share|improve this question
    
Do you still have the backup you made from the old database (presumingly with dev.mysql.com/doc/refman/5.1/en/mysqldump.html )? –  Hennes Apr 15 '13 at 10:26
    
Well no i have not made any normal dumb or such thing else I would not ask here! All I got this the files manually copied from the /var/lib/mysql/ folder –  Wayne's World Apr 15 '13 at 10:35
    
This is the guide for moving an InnoDB database by copying files: 14.2.2.4. Backing Up and Recovering an InnoDB Database. Perhaps you have to force a recovery? 14.2.4.6. Starting InnoDB on a Corrupted Database – else there is for MyISAM and copying of tables: 14.2.2.5. Moving or Copying InnoDB Tables to Another Machine. –  Sukminder Apr 15 '13 at 10:38
    
Yes. According to this Problem Opening Table, you should delete the .frm file. (Or back it up somewhere which you already have I guess – then delete it from the db-dir.) ;) –  Sukminder Apr 15 '13 at 11:05

2 Answers 2

To be pedantic: Yes; you would have needed to delete the .frm files as without any ibdata they has no place.

To cite 14.2.4.7. Troubleshooting InnoDB Data Dictionary Operations"This means that there is an orphaned .frm file without a corresponding table inside InnoDB."

Thus a .frm file without a InnoDB is an orphaned .frm.


But as by the given by my comment link: 14.2.2.4. Backing Up and Recovering an InnoDB Database and 14.2.1.2. Configuring InnoDB in conjunction with the given frm format they are linked.

Thought you copied files residing inside /var/lib/mysql/ as well – my bad.

The log files have, among other things, commits that was only committed to memory – not file as explained here, - and thus, all depending on how the database last was shut down.


Glad it got solved ;)

share|improve this answer
up vote -1 down vote accepted

Turns out that I not had copied the actual databases. I got this my looking into the folders all that in there are the .frm files with the table names and a 65 bite db.opt file, so I knew that cant be the actual database.

They are all inside the ibdata1 file in the root of /var/lib/mysql/ I guess, I thaught the databases where inside the folders that had the names of the databases I created before.

So no I don't needed to delete any .frm files or anything. I copied the ibdata1 file over (while stopped mysql server) and now everything works.

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.