# Unable to start mysql container using docker

**URL:** https://community.bloomreach.com/t/unable-to-start-mysql-container-using-docker/2464
**Category:** Experience Manager (PaaS/OnPrem)
**Created:** [March 8, 2021, 1:50pm UTC](https://community.bloomreach.com/t/unable-to-start-mysql-container-using-docker/2464 "2021-03-08T13:50:31Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Sandeep\_Kumar](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/sandeep_kumar/32/892_2.png) [@Sandeep\_Kumar](https://community.bloomreach.com/u/Sandeep_Kumar)
#### Post date: [March 8, 2021, 1:50pm UTC](https://community.bloomreach.com/t/unable-to-start-mysql-container-using-docker/2464/1 "2021-03-08T13:50:31Z")

</div>

Hi,  
￼  
Iam trying to run mysql container using docker. getting connection refused exception.  
but Iam able to login in my local machine using same credentials.

Steps Followed :

Downloaded the project  
clean install done  
updated the pom.xml with DB properties as suggested in the below doc

> **[Configure Bloomreach Experience Manager for MySQL - Bloomreach Experience -...](https://documentation.bloomreach.com/14/library/deployment/configuring/configuring-hippo-for-mysql.html)**
>
> Headless digital experience platform

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/bloomreach1/original/1X/71017bcde1a57b1866827519654c91dec9119ddf.png)

---

<div class="post-metadata">

### Author: ![machak](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/machak/32/1298_2.png) [@machak](https://community.bloomreach.com/u/machak)
#### Post date: [March 8, 2021, 2:40pm UTC](https://community.bloomreach.com/t/unable-to-start-mysql-container-using-docker/2464/2 "2021-03-08T14:40:29Z")

</div>

it says there no communication link to your server, so, it is not a password/username issue…mysql server is not reachable from your tomcat.

---

<div class="post-metadata">

### Author: ![Sandeep\_Kumar](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/sandeep_kumar/32/892_2.png) [@Sandeep\_Kumar](https://community.bloomreach.com/u/Sandeep_Kumar)
#### Post date: [March 8, 2021, 2:53pm UTC](https://community.bloomreach.com/t/unable-to-start-mysql-container-using-docker/2464/3 "2021-03-08T14:53:04Z")

</div>

How can I fix that?

---

<div class="post-metadata">

### Author: ![machak](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/machak/32/1298_2.png) [@machak](https://community.bloomreach.com/u/machak)
#### Post date: [March 8, 2021, 3:11pm UTC](https://community.bloomreach.com/t/unable-to-start-mysql-container-using-docker/2464/4 "2021-03-08T15:11:22Z")

</div>

by making sure communication between mysql and tomcat is possible. But, I don’t know how you setup this, so, I have no steps for you if you expect that.

---

<div class="post-metadata">

### Author: ![Mort365](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@Mort365](https://community.bloomreach.com/u/Mort365)
#### Post date: [March 10, 2021, 1:51pm UTC](https://community.bloomreach.com/t/unable-to-start-mysql-container-using-docker/2464/5 "2021-03-10T13:51:18Z")

</div>

Most likely it will be because you are using localhost in your container, which will not work on docker containers as localhost is inside the container.

You will need to do this.  
MYSQL\_DB\_HOST=host.docker.internal

host.docker.internal gets the ip of the host system, which in turn will resolve back to 127.0.0.1 meaning the container will then see mysql whther it is running in a docker container, (Best way) or installed on the machine

We have bloomreach working against mysql locally using docker compose no problems

J
