On Wed, Jul 28, 2010 at 10:17 AM, Robert P. J. Day <span dir="ltr"><<a href="mailto:rpjday@crashcourse.ca">rpjday@crashcourse.ca</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
as a followup to something i asked once upon a time, i'm trying to<br>
recover the tables and data for a mysql database given what is alleged<br>
to be the ibdata1, ib_logfile[12] files and the database directory<br>
itself with all of the .frm files, and i *think* i'm getting close.<br>
<br>
on my current ubuntu 10.04 system, i wasn't using mysql for anything<br>
critical so i just popped into the /var/lib/mysql directory, totally<br>
overwrote those files and added that database directory, </blockquote><div><br>You should never do that.<br><br>For MyISAM tables, you may be able to get away with this, since <br>each MYD/MYI paid form one discrete table. The .frm is the table<br>
definition.<br><br>But InnoDB is far more complex and the ibdata file contains lots of data <br>structures inside it.<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
restarted mysql, popped in and "show databases;" shows the db in question.<br>
<br>
i can then "use" the database, and "show tables;" does, in fact,<br>
show me the tables. and then ... not good.<br>
<br>
doing a "describe <tablename>;" gives me:<br>
<br>
ERROR 1286 (42000): Unknown table engine 'InnoDB...<br>
<br>
where the string "InnoDB" has a small number of unprintable characters<br>
after it.<br>
<br>
i have no idea if the ibdata1 or log files have been corrupted, but<br>
the fact that i got as far as i did was promising -- i could see the<br>
database, i could select it and i could list its tables. but i can't<br>
get any further than that.<br></blockquote><div><br>
You can try DROP DATABASE yourdb; followed my mysqladmin create yourdb;<br>
and see if that gets you anywhere.<br><br>Your cleanest option is to restart from scratch. <br><br>Do aptitude purge mysql-server, then remove the /var/lib/mysql directory,<br>and then do an aptitude install mysql-server cleanly.<br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
i'm open to suggestions, and i also plan on going to the ubuntu hour<br>
this evening so if anyone wanted to sit down and give me a hand to<br>
solve this at ubuntu hour, i'm willing to compensate them for their<br>
time.<br></blockquote></div>--<br>Khalid M. Baheyeldin<br><a href="http://2bits.com">2bits.com</a>, Inc.<br><a href="http://2bits.com">http://2bits.com</a><br>Drupal optimization, development, customization and consulting.<br>
Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra<br>Simplicity is the ultimate sophistication. -- Leonardo da Vinci<br>