You need to have you docker host running with docker-machine as default
- Install mycli (https://www.mycli.net/)
brew install mycli
- Clone plugin
git clone https://gist.github.com/a444d8cd84c08a50eea81ae32dbc1644.git $ZSH_CUSTOM/plugins/connect-docker-db
- Enable plugin in ~/.zshrc
plugins=(.. connect-docker-db)
> connect-docker-db container-name-with-mysql
Note: You can use <tab>
key to show all running containers to select one after the commant connect-docker-db