<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 23, 2016, at 7:46 AM, Michael T. Dean <<a href="mailto:mtdean@thirdcontact.com" class="">mtdean@thirdcontact.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 03/23/2016 01:16 AM, Mike Hodson wrote:<br class=""><blockquote type="cite" class="">On Tue, Mar 22, 2016 at 5:31 AM, Michael T. Dean wrote:<br class=""><blockquote type="cite" class="">Chances are the database ones are all just ones people have created to run<br class="">optimize_mythdb.pl (and have nothing to do with mythfilldatabase) , which<br class="">checks and attempts to repair MythTV's MySQL database tables and optimized<br class="">the indices and some other stuff. This action isn't performed automatically<br class="">by MythTV because it's dangerous--if something goes wrong, you could lose<br class="">data. Therefore, users are forced to do it themselves. The safest way is<br class="">manually/interactively when MythTV is not running (with understanding of the<br class="">process and what can go wrong and how to recover when it does), though in<br class="">general, the danger is small enough that you can run it in a daily cron and<br class="">it is likely to do more good than harm.<br class=""><br class=""></blockquote>This entire paragraph leads me to one question: Why does MythTV have<br class="">database errors? Does it not use Inno/Xtra/TokuDB (any that have<br class="">proper transactions) ?<br class=""><br class="">If so 'checking' tables does nothing useful. If not, why not?<br class=""></blockquote><br class="">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 ...<br class=""><br class="">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).<br class=""><br class="">Mike<br class="">_______________________________________________<br class="">mythtv-users mailing list<br class=""><a href="mailto:mythtv-users@mythtv.org" class="">mythtv-users@mythtv.org</a><br class="">http://lists.mythtv.org/mailman/listinfo/mythtv-users<br class="">http://wiki.mythtv.org/Mailing_List_etiquette<br class="">MythTV Forums: https://forum.mythtv.org<br class=""></div></div></blockquote><br class=""></div><div>Speaking of mysql, what is the proper way to restart mysql on myth?</div><div><br class=""></div><div>Say I need to restart mysql for non myth related reasons...</div><div><br class=""></div><div>I do </div><div><br class=""></div><div><pre style="margin-top: 0px; padding: 5px; border: 0px; font-size: 13px; overflow: auto; width: auto; max-height: 600px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; word-wrap: normal; color: rgb(17, 17, 17); widows: 1; background-color: rgb(238, 238, 238);" class=""><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;" class="">sudo /etc/init.d/mysql restart
</code></pre><div class=""><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;" class=""><br class=""></code></div><div class=""><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;" class="">But I presume in this case I need to shudown the backend first, right? What's the command line way to do that?</code></div><div class=""><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;" class=""><br class=""></code></div><div class=""><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;" class="">And secondly, speaking of corruption, whats the sanctioned way of restarting a myth box?</code></div><div class=""><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;" class=""><br class=""></code></div><div class=""><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;" class="">Now I do a sudo reboot</code></div><div class=""><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;" class=""><br class=""></code></div><div class=""><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;" class="">Is that OK?</code></div><div class=""><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;" class=""><br class=""></code></div><div class=""><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;" class="">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.</code></div><div class=""><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;" class=""><br class=""></code></div><div class=""><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;" class=""><br class=""></code></div></div><div><br class=""></div><div><br class=""></div><br class=""></body></html>