Can't bind mysql on localhost

Expected behavior

Running mysql docker image on Docker4Mac in VPN mode
mysql -u user -h localhost -P 3306 --protocol=TCP -ppass database should work like it does on a Linux box

Actual behavior

Can’t connect.
Need to switch off VPN mode and use -h docker.local

Information

  • the output of:

    • pinata diagnose -u on OSX
      OS X: version 10.11.3 (build: 15D21)
      Docker.app: version v1.11.0-beta8.2
      Running diagnostic tests:
      [OK] docker-cli
      [OK] Moby booted
      [OK] driver.amd64-linux
      [OK] vmnetd
      [OK] osxfs
      [OK] db
      [OK] slirp
      [OK] menubar
      [OK] environment
      [OK] Docker
      [OK] VT-x
      Docker logs are being collected into /tmp/20160426-145200.tar.gz
      Most specific failure is: No error was detected
      Your unique id is: E0796B06-72E9-4B39-9F1C-C6293F9048FD
  • a reproducible case if this is a bug, Dockerfiles FTW

using mysql official image

  • host distribution and version ( OSX 10.10.x, OSX 10.11.x, Windows, etc )
    OSX 10.11.3