[mythtv-users] Must mythbackend be running when executing optimize_mythdb.pl and/or mythlink.pl?

James Linder jam at tigger.ws
Sat Apr 7 01:20:04 UTC 2012

On 07/04/2012, at 6:35 AM, mythtv-users-request at mythtv.org wrote:


> Also, the only reason we don't automatically run optimize_mythdb.pl type 
> functionality (repair/analyze/optimize)--we already have code in MythTV 
> to do it all--is because if it were being run and the MySQL server 
> crashes (mysqld crash/power outage/full file system/...) during a table 
> repair, it's critical that a repair is run, again, after restarting the 
> server and before any client attempts to read any data from the table 
> that was being repaired--otherwise, you could lose all of the data in 
> the table.  Therefore, since we can't guarantee that we'll be able to 
> run the repair before anyone else reads from the table before, and 
> because even doing a quick check to see if tables are good before 
> starting the master backend slowed startup sufficiently, on some 
> systems, that we had to remove the check.  That means 
> repair/analyze/optimize are left to the user/"db admin" for the system.  
> And, if there's a database crash, you should probably shut down all 
> MythTV applications, then do an optimize_mythdb.pl or mysqlcheck -r 
> before restarting MythTV (really, that's a good idea any time there's a 
> MySQL crash, even if you weren't running a repair at the time).  
> (Unfortunately, currently optmize_mythdb.pl requires a working settings 
> table, so if your settings table is crashed, you'll need to run 
> mysqlcheck -r directly--and figure out all the right command-line 
> arguments.  I'm hoping to fix that, sometime.)

OK the proverbial dumb question:

I've been using myth for *years* and have never run optimize_mythdb.pl !!

Dutifully I tried: 
[sandypit] /home/jam/mythtv-0.24.2/contrib [68]% maintenance/optimize_mythdb.pl 
Can't locate MythTV.pm in @INC

and cpan search showed nothing
(but there are a couple of candidates in the directory)


why would I run optimize_mythdb.pl ( know that is a kick-me question :-) )
Where would I put MythTV,pm ?

[sandypit] /home/jam/mythtv-0.24.2/contrib [71]% ls /usr/lib/perl5/
5.14.2/  site_perl/  vendor_perl/


More information about the mythtv-users mailing list