Unable to connect to MySQL in Docker from local host (Docker for Mac beta)

Helo,

First and foremost, please refrain from simply linking to another site with your already asked question. Everyone here is willing to help and it makes it easier for us to do so if all the relevant information exists in the thread.

Regarding your inability to connect to your MySQL container from your localhost, I was able to do so via the following:

docker run -e MYSQL_ROOT_PASSWORD=1234 -d -p 3306:3306 mysql:5.7.13
mysql -hlocalhost --protocol=TCP -uroot -p1234

I had to specify --protocol=TCP otherwise MySQL attempts to use a local socket when connecting to localhost.

I also verified the connection works in Sequel Pro (though 127.0.0.1 had to be used over localhost).

Are you able to provide the diagnostic information provided by Docker for Mac?