1

I am using docker toolbox v17.03 in Windows 10 Home. I pulled latest mysql server and run the container.

> docker image pull mysql:latest

   > docker container run --detach --name=test-mysql --env="MYSQL_ROOT_PASSWORD=mypassword" mysql

   > docker logs test-mysql

I am able to see mysql running. I then moved to Sql client and used the ipaddress (given by docker-machine ip). I get Access denied. I also tried the ip address from docker inspect test-mysql, same result )

Not sure what is wrong here?

1 Answer 1

2

I think I found the problem. I didn't map the port. As soon as I change the docker run as follows , I am able to connect via ip address of docker-machine

> docker container run --detach --name=test-mysql --env="MYSQL_ROOT_PASSWORD=mypassword" -p 3306:3306 mysql
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.