connect to mysql with unix socket instead of tcp I'm not looking for the "use 127.0.0.1" solution. 
I want to run the site on my local development environment and use the unix socket to connect to the database. In my settings file I've set the host to 'host' =&gt; 'localhost', and I've tried 'unix_socket' =&gt; '/tmp/mysql.socket', as well, but both result in a PDOException: SQLSTATE[HY000] [2002] error in the apache logs. 

When I connect directly to mysql through the command line I connect through the unix socket, but when I run it through Drupal it only connects through the TCP connection. I am under the impression Drupal will connect through the socket if the localhost host name is used, but this doesn't appear to be the case here.

Perhaps there's some other local configuration I'm missing.
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.