in reply to Re: DBI connection from one mechine to another mechine in perl
in thread DBI connection from one mechine to another mechine in perl

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^3: DBI connection from one mechine to another mechine in perl
by CountZero (Bishop) on Jun 11, 2007 at 05:13 UTC
    It seems like you have forgotten to send the username and password to the database. Add a "user='MY_USERNAME'; password='MY_SECRET_PASSWORD'" to the dsn-string.

    MySQL can be very picky about usernames and passwords, so double check that you are allowed to connect to your database from the machine on which your script runs and that you have all the privileges necessary.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Re^3: DBI connection from one mechine to another mechine in perl
by runrig (Abbot) on Jun 14, 2007 at 22:46 UTC
    Synopses tend not to include things like error checking. So you should have kept the 'or die $dbh->errstr()' from your original example. Then you would have had a better error message than the one you received. Even better, RaiseError makes DBI error checking simple...look in the DBI docs for it.