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

Khalid Baheyeldin kb at 2bits.com
Wed Jul 28 10:48:34 EDT 2010

On Wed, Jul 28, 2010 at 10:43 AM, Robert P. J. Day <rpjday at crashcourse.ca>wrote:

> just to be clear, all i was given as the database contents was a
> directory loaded with .frm files, and a single "db.opt" file.  i'm
> assuming that that's precisely what i should have expected, yes?

What you should be given is a database dump.

Doing it any other way is prone to disaster.

Ask them to create a dump for you.

> You can try DROP DATABASE yourdb; followed my mysqladmin create
> > yourdb; and see if that gets you anywhere.
>   as in, while leaving the /var/lib/mysql/<dbname> directory in
> place, drop the database and bring it back??  you're suggesting that
> that "recreation" will automagically pick up the db directory that's
> still there, but possibly do some repair to make it accessible?  sure,
> i can try that.

I was assuming you have a dump. The above *may* work if you have
a dump and want to clear things and get an empty database before
you proceed.

> 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 can do that, too, but that's just going to get me back to where i
> started, no?

Will get you back to a pristine install where MySQL works, and then
you can create a database and do whatever with it.
Khalid M. Baheyeldin
2bits.com, Inc.
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra
Simplicity is the ultimate sophistication. --   Leonardo da Vinci
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20100728/29ef04b9/attachment.html>

More information about the kwlug-disc mailing list