[mythtv-users] can't run optimize_mythdb.pl from command line

Greg Oliver oliver.greg at gmail.com
Tue Jan 14 04:07:05 UTC 2020


On Mon, Jan 13, 2020 at 9:42 PM Jeremy D. Eiden <theonlyrealperson at gmail.com>
wrote:

> Looking for an answer to Greg Oliver's question, I realized I cannot run
> optimize_mythdb.pl from command line on OpenSuse 15.1, mythtv version
> 29-fixes, and I'd like to put it into cron.  I get this error:
>

Thanks for looking into my question :)

 Base class package "IO::Socket::INET6" is empty.

>     (Perhaps you need to 'use' the module which defines that package first,
>     or make that module available in @INC (@INC contains:
> /usr/lib/perl5/site_perl/5.26.1/x86_64-linux-thread-multi
> /usr/lib/perl5/site_perl/5.26.1
> /usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi
> /usr/lib/perl5/vendor_perl/5.26.1
> /usr/lib/perl5/5.26.1/x86_64-linux-thread-multi /usr/lib/perl5/5.26.1
> /usr/lib/perl5/site_perl).
>  at /usr/lib/perl5/vendor_perl/5.26.1/IO/Socket/INET/MythTV.pm line 14.
> BEGIN failed--compilation aborted at
> /usr/lib/perl5/vendor_perl/5.26.1/IO/Socket/INET/MythTV.pm line 14.
> Compilation failed in require at
> /usr/lib/perl5/vendor_perl/5.26.1/MythTV.pm line 14.
> BEGIN failed--compilation aborted at
> /usr/lib/perl5/vendor_perl/5.26.1/MythTV.pm line 14.
> Compilation failed in require at ./optimize_mythdb.pl line 15.
> BEGIN failed--compilation aborted at ./optimize_mythdb.pl line 15.
>
> As to IPV6, I don't run that at all, I disable it completely.  I've never
> worked at all with Perl, so I'm not exactly sure what to do.  @INC, from
> the error message, already contains the Perl I have installed.
>
> However, it seems like I don't have "DBI" and "MythTV" defined correctly,
> but I don't know how to correctly define them in Perl.
>
> Thank you, and I apologize in advance for the silly question.
>

You do not really need to run that myth provided script.  It is just
running a few MySQL / MariadDB commands.  This bash should get it done
(change your user/pass and host as necessary):

for i in $(echo "show tables;" |mysql -u mythtv -pmythtv -h mysql
mythconverg) ; do for j in repair optimize analyze ; do echo "$j table
$i;"|mysql -u mythtv -pmythtv -h mysql mythconverg; done ; done

echo "ALTER TABLE `recordedseek` ORDER BY chanid, starttime, type;"|mysql
-u mythtv -pmythtv -h mysql mythconverg

echo "ALTER TABLE `program` ORDER BY starttime, chanid;"|mysql -u mythtv
-pmythtv -h mysql mythconverg

echo "ALTER TABLE `filemarkup` ORDER BY filename;"|mysql -u mythtv
-pmythtv -h mysql mythconverg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20200113/8f662a6a/attachment.htm>


More information about the mythtv-users mailing list