in reply to Pointing DBI::DBD::mysql at right socket.

If you look at the synopsis of the DBD::mysql docs, you can see the extended form of the connect string there:
$dsn = "DBI:mysql:database=$database;host=$hostname;port=$port"; $dbh = DBI->connect($dsn, $user, $password);
People usually use the short form "DBI:mysql:$database", but that won't work in your case.

The port number is still optional.

More options still are listed under the heading "connect".