programming-examples/perl/Database/The connect() Method.pl

5 lines
278 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
$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');