[mythtv-users] Sudden seemingly-random database issues - SOLVED
Brian S
inanimatecrbnrod at hotmail.com
Sat Oct 4 10:53:56 UTC 2014
On 09/30/2014 11:01 PM, Karl Newman wrote:
>
>
> Probably because mythtv uses myisam (with the exception of some
> mythweather tables) so it's not hitting the innodb engine which has
> the errors. You could probably leave the force_recovery in place but
> to me it signifies a serious problem with your install and should be
> corrected (somehow!).
Mostly for documentation's sake in case anyone else runs into this
problem...
Your comment on the mythweather tables got me headed in the right
direction, or at least not afraid to break the innodb portion of the
database since it's clearly a very small part of the mythtv
functionality (oddly I don't even have the mythweather plugin installed
on the MBE...but maybe I used to when the machine was the only BE).
Anyway the instructions at the link below were pretty useful. I did some
additional google-fu to make sure I was dumping/dropping/restoring the
tables correctly and things seemed to go pretty smoothly.
http://chepri.com/mysql-innodb-corruption-and-recovery/
Steps I followed were very similar, only I just did the 3 innodb tables
instead of the whole DB:
1. restart mysql with the innodb_force_recovery=2 flag
2. enter the mysql shell and run the query:
SELECT table_schema, table_name
FROM INFORMATION_SCHEMA.TABLES
WHERE engine = 'innodb';
It just returned 3 weather tables.
3. Dump those three tables.
4. Drop those three tables.
5. Stop mysql.
6. in /var/lib/mysql/, delete the three ib* files
7. comment out the force_recovery flag my.cnf
8. restart msqld - it complains a bit about missing files and then
creates them
9. Restore the three dropped tables from the dump.
Thanks again to everyone who offered assistance.
More information about the mythtv-users
mailing list