Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: unable to connect new database in mysql

by cjb (Friar)
on Aug 10, 2011 at 11:41 UTC ( #919640=note: print w/ replies, xml ) Need Help??


in reply to Re^2: unable to connect new database in mysql
in thread unable to connect new database in mysql

Is your database sever on the localhost and running on the default port?

What arguments to mysql are you using to connect on the command line?

You might want look at something like:

my $db = 'ram'; my $host = ''; # hostname my $port = ''; # portnumber $dbh = DBI->connect("DBI:mysql:database=$db;host=$host;port=$port",'ro +ot','root') or die "Connection Error: $DBI::errstr\n";


Comment on Re^3: unable to connect new database in mysql
Select or Download Code
Re^4: unable to connect new database in mysql
by rammoorthi (Novice) on Aug 10, 2011 at 12:40 UTC
    Thanks its working fine after adding host and port number.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://919640]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2014-04-17 02:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (437 votes), past polls