mysql_db: if connection is a socket, do not specify hostname