Open samaimia opened 8 years ago
are you shure your docker-container named "mysql" is running as well as the mysqld-service inside the container?
@samaimia
If you have set a password for the root user, this should work
docker run -it --rm --link mysql sameersbn/mysql:latest mysql -hmysql -uroot -p
else try
docker exec -it mysql mysql -uroot
I had the same Issue installing mysql in my own dockerfile, here is a solution: http://stackoverflow.com/questions/1673530/error-2003-hy000-cant-connect-to-mysql-server-on-127-0-0-1-111 Maybe the best approach would be running a script for commenting the bind-address line in my.cnf file using CMD in the Dockerfile.
Trying to get a shell in the docker using
docker run -it --rm --volumes-from=mysql sameersbn/mysql:latest mysql -uroot
causes