in reply to Timeout problems (DBI)
In my own access function for connecting to a mysql server, my dsn string goes like this:
I don't know if that'll make the difference in your case, but it works for me, and it's something that differs between my working code and your non-working code.$dsn = "DBI:mysql:database=test;host=host.name.dom"
Apart from that, have you determined that you are able to connect to the database by other (non-perl) means -- e.g. can you run a mysql client from the command line and connect to that database using the given user/password/host/dbname values?
I also tend to set RaiseError to true, so if the connect fails, the script dies right away with an error message. You should at least check for success from the DBI "connect" call, if you're not going to set the RaiseError parameter.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Timeout problems (DBI)
by FireBird34 (Pilgrim) on Sep 15, 2004 at 02:23 UTC | |
by Anonymous Monk on Feb 25, 2005 at 19:03 UTC |