Posted By

alfirth on 05/04/11


mysql socket DBI dbh dbn

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


connect to mysql using a different socket

 / Published in: Perl

  1. my $dsn = "dbi:mysql:$db_name:$db_server:$db_port;mysql_socket=/san01/mysql/data1/mysql.sock";
  2. my $dbh = DBI->connect($dsn, $db_user, $db_pass) or die "Unable to connect: $DBI::errstr\n";
  3. my $qry = $dbh->prepare($query);
  4. $qry->execute();

Report this snippet  


RSS Icon Subscribe to comments
Posted By: on December 21, 2018

the 8 best 50 inch tv under 300 best2by

You need to login to post a comment.