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)
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;