[mythtv-users] MySQL borked

Gary Buhrmaster gary.buhrmaster at gmail.com
Sat May 25 02:37:05 UTC 2013


On Sat, May 25, 2013 at 2:20 AM, Phill Edwards <philledwards at gmail.com> wrote:

....
> Yes, I restarted MySQL with this setting:
>       innodb_force_recovery = 2
> That allowed me to get into mysql and SELECT INTO OUTFILE. (Stupidly I
> stored them in /tmp as that was the only place the mysql user seemed
> to have easy write access to and I then lost them all on the reboot.

The tmpfs definition for /tmp may be right architecturally, but long time
sysadms are still getting surprised by /tmp really being /tmp (unless
you are a Solaris sysadm, which has used tmpfs for a long long time).

> Not really a biggie that, it just means I'll have to restore the DB
> from a backup which is a couple of months old so I'll lose access to
> some recordings and have to run the orphn tidy up script). Anyway,
> while this option allowed me to get MySQL running, I couldn't get it
> running in normal mode afterwards with this setting turned back off. I
> then dropped the mythconverg database and recreated it but I still
> couldn't restart MySQL, so at that point I remove it and reinstalled.
> And I STILL can't start it, which is why I'm now well and truly
> confused and stuck.

Well, at this point, I think you are stuck with the big hammer approach
unless someone else has a better idea (perhaps wait to see if
someone else has a better idea than I).  I would stop mysql (it seems
from your logs it is trying restart, so disable system initialization
process that is restarting it, probably some part of upstart).  Delete
all the files in /var/lib/mysql (or wherever your system stores those files),
remove mysql using your package manager, reinstall it, modify the
my.cnf file if needed, and start mysql.  It should recreate all the basic
mysql files, and you can then restore the mythconverg database.
Note that you should be sure to follow the instructions on the wiki
(in particular, regarding grants) to restore the database.

Remember that you can move your orphaned files to the videos
directory, although you will need to categorize them as needed.

Gary


More information about the mythtv-users mailing list