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";

Replies are listed 'Best First'.
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.