g00glen00b / dimitri.codes

Static generator for dimitri.codes using Gatsby
https://dimitri.codes
Other
20 stars 8 forks source link

msql workbench cannot connect to mysql running in container #89

Closed jordensy closed 3 years ago

jordensy commented 3 years ago

Blogpost:

I have a question about Containerizing your Spring boot application with Docker.

Description:

Hi, thanks for you great article. It was in fact the only one that worked for me. that is until then I was not able to have my springboot app talk to my mysql database both running in docker. see my docker-compose.yml:

docker-compose

What I found out is that the way the datasource URL is defined, is very impactive to how the connection is reacting. What I had was missing is that when I add the ports into my datasource url (e.g.: jdbc:mysql://mysql-service:3308/logaas?...) I get a connection refused but whithout them in the URL it works fine. However Now I am unable to connect with MSQL workbench (that is not in docker container) to connect to the running database. Strange because my database port is published to 3308:3306.

So except for not understanding why the ports cannot be in the URL I am stuck with connecting my client to the database container. do you have any suggestion?

Thanks Yvan

jordensy commented 3 years ago

Please close the issue.

I made a stupid typo misstake in the target port that I overlooked each time :-(

g00glen00b commented 3 years ago

It happens to all of us. Glad to see that you were able to find the problem!