[mythtv-users] does myth 'best practice' have me adding anything to cron?

steve stevenospam at gmail.com
Thu Mar 24 03:39:03 UTC 2016


> On Mar 23, 2016, at 7:46 AM, Michael T. Dean <mtdean at thirdcontact.com> wrote:
> 
> On 03/23/2016 01:16 AM, Mike Hodson wrote:
>> On Tue, Mar 22, 2016 at 5:31 AM, Michael T. Dean wrote:
>>> Chances are the database ones are all just ones people have created to run
>>> optimize_mythdb.pl (and have nothing to do with mythfilldatabase) , which
>>> checks and attempts to repair MythTV's MySQL database tables and optimized
>>> the indices and some other stuff.  This action isn't performed automatically
>>> by MythTV because it's dangerous--if something goes wrong, you could lose
>>> data. Therefore, users are forced to do it themselves.  The safest way is
>>> manually/interactively when MythTV is not running (with understanding of the
>>> process and what can go wrong and how to recover when it does), though in
>>> general, the danger is small enough that you can run it in a daily cron and
>>> it is likely to do more good than harm.
>>> 
>> This entire paragraph leads me to one question: Why does MythTV have
>> database errors? Does it not use Inno/Xtra/TokuDB (any that have
>> proper transactions) ?
>> 
>> If so 'checking' tables does nothing useful. If not, why not?
> 
> MythTV doesn't have database errors.  Some systems running MythTV have corrupt database files because MySQL isn't always shut down properly--i.e. sometimes it crashes because power is lost or the kernel OOM killer kills it or ...
> 
> When MySQL crashes in the middle of a write, it generally leaves the MySQL binary data files in a broken state that must be repaired. So, since most MythTV users don't want to be on-call database admins, a lot of people just run the optimize_mythdb.pl script in a cron job and hope for the best (and fix things up when they notice a problem).
> 
> Mike
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

Speaking of mysql, what is the proper way to restart mysql on myth?

Say I need to restart mysql for non myth related reasons...

I do 

sudo /etc/init.d/mysql restart

But I presume in this case I need to shudown the backend first, right?  What's the command line way to do that?

And secondly, speaking of corruption, whats the sanctioned way of restarting a myth box?

Now I do a sudo reboot

Is that OK?

Or am I supposed to be using a myth provided shutdown routine?  Because somewhere in the settings, I saw something about shutting down with different pre/post stages or something.





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20160323/4a88d5db/attachment-0001.html>


More information about the mythtv-users mailing list