[mythtv-users] mythtv dropping mysql???

Rich Freeman r-mythtv at thefreemanclan.net
Wed Oct 22 12:05:45 UTC 2014


On Wed, Oct 22, 2014 at 7:01 AM, Michael T. Dean
<mtdean at thirdcontact.com> wrote:
> On 10/22/2014 04:24 AM, Michael Watson wrote:
>>
>> On 22/10/2014 12:19 AM, Michael T. Dean wrote:
>>>
>>>
>>> More than just set up--as you say below, distros like Mythbuntu or LinHES
>>> have done an excellent job of making setup nearly foolproof.  However, even
>>> just maintaining the database is difficult enough for non-DBA's (even those
>>> using distros like Mythbuntu/LinHES that do their best to help maintain the
>>> DB). See, for example, the tip of the iceberg at:
>>>
>>> https://code.mythtv.org/trac/ticket/12299
>>> https://code.mythtv.org/trac/ticket/10831
>>> https://code.mythtv.org/trac/ticket/10348
>>> https://code.mythtv.org/trac/ticket/10177
>>> https://code.mythtv.org/trac/ticket/9978
>>> https://code.mythtv.org/trac/ticket/9300
>>> https://code.mythtv.org/trac/ticket/8404
>>> https://code.mythtv.org/trac/ticket/8473
>>> https://code.mythtv.org/trac/ticket/8089
>>> https://code.mythtv.org/trac/ticket/6429
>>> https://code.mythtv.org/trac/ticket/5415
>>> https://code.mythtv.org/trac/ticket/3804
>>> (That being just a sampling of the ones that were actually reported as
>>> bugs that doesn't even touch the significantly greater number of posts on
>>> list with the same issue, let alone the questions in IRC, or the people who
>>> didn't know what was going on and also never asked on a MythTV
>>> list/forum/irc channel and eventually either figured it out themselves or
>>> deleted their DB and started over or waited long enough for the scheduled
>>> optimize_mythdb.pl their distro had set up to fix it or ...)
>>
>> Does MySQL need to be embedded for the MBE to regularly run
>> optimize_mythdb.pl or a backup by itself?????
>
>
> If you run any kind of REPAIR TABLE (mysqlcheck -r or optimize_mythdb.pl or
> submit REPAIR TABLE via mysql command-line client) and it fails and
> /anything/--that's any process at all--attempts to access (even just a read
> query) the table before you've successfully completed the repair, data will
> almost definitely be lost, potentially even the entire table.  Therefore, to
> automatically run REPAIR TABLE, we have to ensure no one at all (no official
> applications, nor 3rd party clients, nor mysql command-line clients, nor
> phpmyadmins, nor...) will use that table until it's properly fixed.
> Therefore, it is extremely unsafe to automatically repair tables when we
> allow/require everyone and their brother to make direct connections to the
> database.

The obvious solution to this is to let the person who damaged the
tables (the system administrator) repair the tables.  :)

I would never submit a broken table error as a bug.  That is obviously
the result of an unclean shutdown.  If it happens I want to know about
it, I don't want MythTV to try to automagically clean things up and
possibly make things worse.  I'm going to shut down MythTV, backup my
tables (possibly at the filesystem level with MariaDB shutdown), and
get them working in MariaDB before I start up MythTV.

By all means distros can automate this process and ensure the database
is working before starting MythTV.  That seems like the right way to
fix this if you wanted an appliance-like solution.  You don't have to
embed lirc and the kernel to ensure that a compatible version is
installed, etc.

--
Rich


More information about the mythtv-users mailing list