[kwlug-disc] how to recover a mysql database when getting "Unknown table engine 'InnoDB???" err

Robert P. J. Day rpjday at crashcourse.ca
Wed Jul 28 10:55:21 EDT 2010


On Wed, 28 Jul 2010, Khalid Baheyeldin wrote:

> Your cleanest option is to restart from scratch.
>
> Do aptitude purge mysql-server, then remove the /var/lib/mysql
> directory, and then do an aptitude install mysql-server cleanly.

  i have no problem doing this, but let me summarize what i'm looking
at.  i can happily wipe all of mysql from my ubuntu box (including all
of /var/lib/mysql) and reinstall, which will of course give me a fresh
/var/lib/mysql directory.

  at that point, what i have in hand to recover the tables from is:

  * an ibdata1 file
  * the two log files ib_logfile[12]
  * a single database directory full of .frm files

  so, first question:  is the above *technically* all i would need to
recover that database, *assuming those files are uncorrupted*?
because while i have those files, it's not clear that they're healthy.
is there a utility i can run on them to sanity check them before i go
any further?  god knows, maybe they're not even compatible with one
another.

  and, second, given those files and that directory, what is the
proper series of steps to manually add them to my mysql server so that
they would magically appear to my mysql client?

  i was pretty sure everyone knew what i was trying to do, but
explaining it one more time never hurts.  thoughts?

rday

-- 

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

        Top-notch, inexpensive online Linux/OSS/kernel courses
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



More information about the kwlug-disc_kwlug.org mailing list