[rt-users] RE: Database connect failure

Mike Frazer Michael.Frazer at InterCept.Net
Thu Nov 20 10:39:11 EST 2003


Using a test script I get the following error, even with root:

DBI connect('database=test;host=localhost','root',...) failed: Access denied
for user: 'root at localhost' (Using password: YES) at testcnx.pl line 26

Here is the code:

##### Include the necessary libraries
use DBI;
use DBD::mysql;


##### Set up DSN
my $dsn = "DBI:mysql:database=$database;host=$hostname";

##### Establish connection to database
my $cnx = DBI->connect($dsn, $username, $password);


(All connection-related variables *are* being set properly).

Root has privileges to connect from localhost (duh), and I set the same
permissions for rt_user.

I tried upgrading DBD::mysql to the latest version and it fails all tests.
So I tried updating DBI as well, and all goes fine with that.  No errors.

This all started when I attempted to upgrade from rt-3.0.2 to 3.0.6 so we
could install and test RTFM.  The RT upgrade went just fine, but all
database connectivity is now broken for all of Perl.



-----Original Message-----
From: seph [mailto:seph at directionless.org]
Sent: Tuesday, November 18, 2003 9:36 PM
To: Mike Frazer
Cc: rt-users at lists.fsck.com
Subject: Re: Database connect failure


> The database resides on the localhost, and the user and password are
default
> for RT.  I've verified the permissions, and I can connect from the command
> line with *all* users in the DB, including the RT user.

> Does anyone ahve any idea what I'm missing?

without seeing the actual error, it's hard to say. One persistant
problem I've have with mysql, is whether or not it thinks I'm
connecting as "user" "user at localhost" or "user at hostname".

seph



More information about the rt-users mailing list