Greg D. [[EMAIL PROTECTED]] wrote: > Hello, > > I am having problems connecting to my database when i run the script from > command line. I get the following error on my log files: > > DBI->connect(maillist:localhost:3306) failed: Access denied for user: > 'username@localhost' (Using password: NO)
Sounds like it's a mysql *user* permission issue - make sure you "grant" the proper permissions to the mysql "<username>" user - note that that includes the "@domain", or "@localhost" in your case. HTH. -- Hardy Merrill Senior Software Engineer Red Hat, Inc. > > I have checked everything to make sure the permissions were right on the user > table. ANy Help would be appreciated > > THis is the actual code: > > my $database = "DBI:mysql:maillist:localhost:3306"; > my $username = "username"; > my $passwd = "password"; > > $dbh = DBI->connect($database, $username, $passwd) || die "Error connecting > $username $passwd: $!" . $dbh->errstr; > $sql_statement = "DELETE from list"; > > $sth = $dbh->prepare($sql_statement) || die "Error1 preparing delete > statement:\n" . $dbh->errstr; > $sth->execute() || die "Error2 executing delete statement:\n" . > $sth->errstr;
