Inside the container, to connect to mysql command line type, mysql -u root -p Restart docker container and run following commands to get to the bash shell in the mysql container docker ps I have following mysql block under services object in my docker-compose.yml file. Specify mysql configuration block in your docker-compose.yml. You have to do few configuration in you docker container.