[mythtv-users] Password error on optimize_mythdb.pl

Michael T. Dean mtdean at thirdcontact.com
Sun Feb 25 04:11:19 UTC 2018


On 02/24/2018 01:23 PM, Greg wrote:
>
> On 02/24/2018 12:05 PM, Don Brett wrote:
>> I recently migrated from 12.04 to 16.04. optimize_mythdb.pl worked 
>> fine on the older version, but I get a password error on this one.
>>
>> don at nick:~/Downloads$ sudo perl 
>> /usr/share/doc/mythtv-backend/contrib/maintenance/optimize_mythdb.pl
>>
>> DBI 
>> connect('database=mythconverg:host=localhost;port=3306','mythtv',...) 
>> failed: Access denied for user 'mythtv'@'localhost' (using password: 
>> YES) at /usr/share/perl5/MythTV.pm line 373.
>> Cannot connect to database:
>>
>> Mythtv generally works fine and config.xml has the correct password.  
>> Is there a password change somewhere else to correct?
>>
> I just ran it from a terminal and it runs fine.. I don't believe you 
> need sudo.. Give it a try..

Correct, sudo isn't necessary (and, really, is not recommended--I'd go 
so far as to say I recommend you never run it as root).  And whoever 
runs it--you or root--needs a proper environment with a HOME and a 
$HOME/.mythtv/config.xml for it to work right.  Generally sudo makes 
setting the environment more tricky.

Mike


More information about the mythtv-users mailing list