Help for this page

Select Code to Download


  1. or download this
        my $db = DBI->connect("DBI:mysql:database=$sql_database;host=$sql_
    +host;port=$sql_port;mysql_socket=$sql_socket", $username, $password,{
    +'RaiseError' => 1});
    
  2. or download this
    
    $dsn = ‘dbi:mysql:dbname=NameOfDatabase’;
    ...
    $dbh = DBI->connect($dsn, $user, $password,
    { RaiseError => 1, AutoCommit => 0 });
    
  3. or download this
    $dbh->do( qq(CREATE DATABASE NAME) );