MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Jon  Miller Date:January 22 2006 12:45pm
Subject:Unable to initialise database
View as plain text  
Having a problem connecting to a MySQL database from a mail server.  In the mail logs I'm
mail MailScanner[4904]: Unable to initialise database connection: Can't connect to MySQL
server on '' (110)

In the script that is running it has a mysql_connect statement with the correct
credentials.  From the command line of the mail server I can issue the command 
# MySQL -u mailwatch -h mailscanner -p 
then I give it the password  after which I have a MySQL prompt.
I have in the database the user name with GRANT privileges on both local host and the mail

So I'm trying to figure out why it does not work from within the script.  I think it may
have to do with the DBI connector.
Tried the following but getting errors


use DBI

$host = '';
$port = '3306';

$dbh = DBI->connect ("DBI:mysql:mailscanner"; mailwatch, mailwatch);

if ($dbh) {print "Connection successful! \n" }

error message:
DBI version required--this is only version 1.46 at
/usr/share/perl/5.8/Exporter/ line 107.
BEGIN failed--compilation aborted at ./ line 5.

Any ideas?


Unable to initialise databaseJon  Miller22 Jan
  • Re: Unable to initialise databasegerald_clark23 Jan