I am looking for the right syntax to use to create an SSH tunnel (on a non-standard port, eg 3309) that I can use from Mac OS X Yosemite terminal, which will enable me to use Sequel Pro to connect to the mysql container running inside boot2docker.
For example, I tried this,
ssh -L3309:localhost:3306 docker@$(boot2docker ip)
but it asks for [email protected]'s password and I don't think that is needed so I'm assuming that's not quite right.
Thanks!
If you don't want to tunnel into docker, you can just setup a ssh connection through Sequel pro
Create a new connection in Sequel pro and choose the SSH connection option and follow the instructions below to populate the fields.
Issue the command below to get your mysql host
docker inspect --format='{{.NetworkSettings.IPAddress}}' "container id or container name"
If you don't know your container id or name, do docker ps -a
, and locate the id or name from the output.
Enter boot2docker ip
in your terminal to get the host
docker
tcuser
Test your connection and after it is successful, save it to your favorites!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With