hi......can you please help me to connect in database using perl...what is the appropriate database to use and what is the connection string.....
thank you...
thank you...
use strict; use DBI; my $db = DBI->connect( 'databasename', 'username', 'usepassword', $db->disconnect();
use strict; use warnings; use DBI: use DBD::mysql; my $Host = "localhost"; my $DbName = "dbname"; my $DbUser = "username"; my $DbPassword = "xxxxx"; # personally, I would pull this from a config file. $dbh = DBI->connect("dbi:mysql:host=$Host;database=$DbName", $DbUser , $DbPassword) or die;
Comment