MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Duncan Hill Date:November 25 2003 4:10pm
Subject:Intermittent 'access denied' errors.
View as plain text  

I've just finished installing 4.1 alpha (yes, I know, alpha) on a test setup.  
Now that I'm starting to stress test it, I've run into an odd bug:

Every once in a while, (and from what I can tell, randomly) the server will 
reject the attempted connection from another host on the network with an 
access denied message.

Perl script used to test:

use DBI;
# Set up the DB connection
my $dsn = "dbi:mysql:host=;database=test";
my $user = "user";
my $password = "password";
$goodcount = 0;
$errorcount = 0;
$bar = 0;
while ($bar < 1000) {
        $dbh = DBI->connect($dsn, $user, $password, {PrintError => 1});
        if ($DBI::errstr) {
                print "!";
        } else {
                print ".";
print "\n$goodcount / $errorcount\n";

The end result is that somewhere along the line, usually before connection 
attempt #100 is reached, the following occurs:
DBI connect('host=;database=test','user',...) failed: Access 
denied for user: 'user@stripped' (Using password: YES) at line 26

I'm also seeing the same intermittent failures in my PHP scripts.

Linux 2.4.20-20.9 #1 Mon Aug 18 11:45:58 EDT 2003 i686 i686 
i386 GNU/Linux
RedHat 9 based system, fully updated glibc etc.  MySQL 4.1 installed from the 
RPMs provided on the site.

I can work around the issue in my PHP scripts, merely by looping the 
connection attempt a set number of times if a failure is encountered.  Not 
the nicest of solutions though.

Is this a known problem in 4.1?  Any better way I can debug it to provide 

Intermittent 'access denied' errors.Duncan Hill25 Nov
  • Re: Intermittent 'access denied' errors.(Michael Johnson)25 Nov
Re: Intermittent 'access denied' errors.Duncan Hill25 Nov