Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Unable to connect to database

by Tux (Abbot)
on Aug 07, 2013 at 11:33 UTC ( #1048337=note: print w/replies, xml ) Need Help??

in reply to Unable to connect to database

Besides that, your code won't work. The driver part of the DSN separates by semi-colons, not by colons:

my $data_source = "DBI:mysql:database=" . $db . ":host=" . $host . ":p +ort=" . $port; my $dbh = DBI->connect($data_source,$user,$password,{ PrintError => 0} +);


my $data_source = "dbi:mysql:database=$db;host=$host;port=$port"; # these colons should be semi-colons ^ ^ my $dbh = DBI->connect ($data_source, $user, $password, { PrintError => 0, });

Enjoy, Have FUN! H.Merijn
my $data_source =

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1048337]
[shmem]: Discipulus: well, a node with just one glaring truth on it is most easily upvoted ;-)
[Discipulus]: i'd like to be the vote fairy just one month.. ;=)
[choroba]: My average XP per node lowered in the last three months :(
[choroba]: (check my homenode for the graph link and the tool to create it)

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2017-04-26 11:58 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (474 votes). Check out past polls.