my $dbh=DBI->connect('dbi:mysql:dbname' . ';host=localhost' . ';mysql_socket=/var/mysql4.1.9/mysql.sock', 'user', 'password');