<br><br><div class="gmail_quote">2008/6/5 Matt Emmott <<a href="mailto:memmott@gmail.com">memmott@gmail.com</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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:<br><br>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<br>
Cannot connect to database:<br><br>Here's the chunk of code around line 337 in MythTV.pm:<br><br> # Connect to the database<br> $self->{'dbh'} = DBI->connect("dbi:mysql:database=$self->{'db_name'}:host=$self->{'db_host'};port=$self->{'db_port'}",<br>
$self->{'db_user'},<br> $self->{'db_pass'})<br> or die "Cannot connect to database: $!\n\n";<br></blockquote>
<div><br>After the '# Connect to the database'<br><br>add:<br><br>die "Trying to connect using: user = -".$self->{'db_user'}."-, pass = -".$self->{'db_pass'}."-, db host = -".$self->{'db_host'}."-\n\n";<br>
<br>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.<br><br>
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.<br><br>However, mythtv and localhost are very common so would also be valid defaults and may be confusing the issue.<br>
<br>Ian<br><br></div></div><br>