error connecting to mysql from docker container code example
Example: docker ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (61)
# This seems to work... Your milage may vary...
% docker run --rm -d -e MYSQL_ROOT_PASSWORD=pass -p 3325:3306 --name mysql_test mysql:5.7
% mysql -uroot -ppass -h127.0.0.1 -P3325