(It\'s probably a dumb question due to my limited knowledge with Docker or mysql administration, but since I spent a whole evening on this issue, I dare to ask it.)
if you running docker under docker-machine?
execute to get ip:
docker-machine ip
returns the ip for the machine and try connect mysql:
mysql -h