Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing database port does not work #52

Open
flip111 opened this issue Apr 9, 2020 · 2 comments
Open

Changing database port does not work #52

flip111 opened this issue Apr 9, 2020 · 2 comments
Assignees

Comments

@flip111
Copy link
Contributor

flip111 commented Apr 9, 2020

I changed these lines

PMA_PORT: 3307

and

      - ${IP}:3307:3307 # change ip if required

in docker-compose.yml. Then i run docker-compose up

Then when i run sudo netstat -tulpn | rg 3306 i get

tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      7992/docker-proxy

When CTRL + C in docker compose terminal, and i do netstat again i see that port 3306 is no longer in use.

@nezhar
Copy link
Owner

nezhar commented Apr 30, 2020

The database container will always run on 3306 in the internal network. The mapping is only required if you want to access the container from outside the network with an additional database tool (such as DataGrip, HeidiSQL...).

In other words the PMA_PORT should remain configured to 3306.

You can change although the ports in the db service. Changing it to ${IP}:3307:3306 will allow you to access the database remotely on port IP:3307

@flip111
Copy link
Contributor Author

flip111 commented May 2, 2020

The problem is that when you boot this container you get a port conflict on your local machine when it also has mysql/mariadb

The database container will always run on 3306 in the internal network.

Why is this the case? Surely it must be configurable somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants