Jon Miller wrote:

Having a problem connecting to a MySQL database from a mail server.  In the 
mail logs I'm getting:
mail MailScanner[4904]: Unable to initialise database connection: Can't connect 
to MySQL server on '192.168.10.4' (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 192.168.10.4 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 server.

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

#!/usr/bin/perl

use DBI
You forgot a semi-colon after 'use DBI'.

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

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

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

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


Any ideas?

Jon




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to