connect to mysql with unix socket instead of tcp
I quickly figured this out after posting. To connect using a socket use 'unix_socket' =&gt; '/tmp/mysql.sock', not .socket.

This allows me to connect to mysql using the unix socket instead of the networking IP address, 127.0.0.1. This may be an issue with core since I think by default Drupal should connect on this default socket.