how to change mysql connection port in docker adminer settings

1k views Asked by At

I have a docker image with mysql which has an internal port of 3307. I'm also trying to run the container for adminer, but when it starts it tries to connect to the standard port 3306, is there any variable that would indicate the port number to connect to?

1

There are 1 answers

2
RP.S On

You can map the 3306 port of the host and the 3307 port of the container, so that you can connect by connecting the IP:3306 of the host. Of course, you can change the my.cnf file of the container and change the port to 3306, which can also be solved.