I’m an experienced perl programmer but am just starting to learn mySQL. Can anyone help me with my connection string ? I’m not entirely sure how this works with dreamhost, so is something wrong here ?
$DSN = “DBI:mysql:sqldbname”;
$user = “user”;
$pw = “pass”;
$dbh = DBI->connect($DSN,$user,$pw)|| die “Cannot connect: $DBI::errstr\n” unless $dbh;
when I run this I get the following error -
Cannot connect: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)
do i have to include the hostname in the connect string , and if so, what would that be ?
Sorry, I’m just new with mySQL.