Connect to mysql : DBI « Database « Perl






Connect to mysql

   

$dsn = dbi:mysql:northwind; $username="root"; $password="letmein";
$dbh = DBI->connect($dsn, $user, $password,{ PrintError => 0, RaiseError => 1, AutoCommit => 0 });

   
    
    
  








Related examples in the same category

1.Listing Currently Installed Drivers
2.Listing Valid DSNs
3.Talking with the Database
4.The connect() Method
5.Use DBI to connect to a database
6.Connect to Oracle
7.Binding Columns
8.Available DBI Drivers and Data Sources