Share and learn in the Docker community.
i’m newbie on docker.
I installed. https://hub.docker.com/_/mysql/
docker run --name mysql -v D:\mysql\data:/var/lib/mysql -v D:\mysql\config:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=123456 -d mysql
i want to connect to mysql server by SQLyog how can i know ip address container ?
Can you help me? please!
if you want to access your mysql from your host it is generally a good idea to not know the ip, but to map the mysql port from the container to the host.
You can do this by docker run --name mysql.....-p 3306:3306 ...... -d mysql.
docker run --name mysql.....-p 3306:3306 ...... -d mysql
thanks for your reply.
how can i know ip address container ? because SQLyog need to IP Adress.
if you map the port to your host, you just could use the IP of your host. 127.0.0.1 for example.
Thank you. i worked perfectly!