[mythtv-users] errors when running perl scripts

Matt Emmott memmott at gmail.com
Sun Jun 8 02:06:12 UTC 2008

On Fri, Jun 6, 2008 at 6:33 AM, Ian Clark <mrrooster at gmail.com> wrote:

> 2008/6/5 Matt Emmott <memmott at gmail.com>:
>> I seem to have an error when running mythrename.pl or ipodexport.pl. I
>> have no idea what the error really means and was hoping for some help.
>> Here's the error:
>> 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 337
>> Cannot connect to database:
>> Here's the chunk of code around line 337 in MythTV.pm:
>>     # Connect to the database
>>         $self->{'dbh'} =
>> DBI->connect("dbi:mysql:database=$self->{'db_name'}:host=$self->{'db_host'};port=$self->{'db_port'}",
>>                                       $self->{'db_user'},
>>                                       $self->{'db_pass'})
>>             or die "Cannot connect to database: $!\n\n";
> After the '# Connect to the database'
> add:
> die "Trying to connect using: user = -".$self->{'db_user'}."-, pass =
> -".$self->{'db_pass'}."-, db host = -".$self->{'db_host'}."-\n\n";
> This will cause it to exit and print out the values for the user/password
> and hostname it's trying to connect to, you can then grep for these details
> in the config files to work out which one it's using.
> It sounds like it's a bad password somewhere (or it's defaulting to mythtv
> as it can't work it out of something.) as the hostname and username look to
> be correct in that error message.
> However, mythtv and localhost are very common so would also be valid
> defaults and may be confusing the issue.
> Ian
You guys rock. Adding that chunk of code told me that it was trying to use
the username and pw of mythtv. I copied the config.xml to  the matt user's
.mythtv directory and was able to run  mythrename.pl  successfully.
ipodexport is giving me errors but I'll post a separate thread for that.
Thanks for the help!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20080607/743d9903/attachment.htm 

More information about the mythtv-users mailing list