The connect() Method
$dbh= DBI->connect("dbi:<RDMS>:<database>","<username>","<password>",\%attributes) or die("Couldn't connect");
$dbh=DBI->connect('DBI:mysql:sample_db','root','quigley1') or die "Can't connect";
$dbh=DBI->connect('DBI:mysql:database=sample_db;user=root;password=quigley1');
Related examples in the same category