in reply to how to test a connection with mysql db
1) are you sure the mysql server is running? try to connect using the 'mysql' command.
2) double-check your parameters, hostname, port, username and password.
3) try with a simple snippet of code.
4) if it still doesn't work, post your code here.
here's the simplest exemple:my $dbh = DBI->connect("DBI:mysql:database='database':host=localhost:p +ort=3307,'root','password') or die "can't connect: $!";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to test a connection with mysql db
by Anonymous Monk on Jul 22, 2005 at 07:09 UTC | |
by wazoox (Prior) on Jul 22, 2005 at 07:17 UTC | |
by Anonymous Monk on Jul 22, 2005 at 07:42 UTC | |
by wazoox (Prior) on Jul 22, 2005 at 09:34 UTC | |
by jeanluca (Deacon) on Jul 25, 2005 at 12:29 UTC | |
|