Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Connect To Custom MySQL Instance

Edited

I am using a custom MySQL image on the pipeline:

image  
name: <dockerusername>/mysql-unit-test-db:latest  
username$DOCKER_HUB_USERNAME  
password$DOCKER_HUB_PASSWORD  
email$DOCKER_HUB_EMAIL

I am not having issues getting the image from DockerHub, that works fine, but when I try to access MySql from my steps it will not allow me to connect.  (When I run the image locally I can connect just fine).  I have tried to connect a couple of different ways:

mysql -h ${BITBUCKET_DOCKER_HOST_INTERNAL} -u root -ppass -e "SHOW DATABASES;"

 ERROR 2003 (HY000): Can't connect to MySQL server on '10.39.173.114' (111)

mysql -h 127.0.0.1 -u root -ppass -e "SHOW DATABASES;"

 ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)

I have also tried to run a script that waits for MySql to start up but that has not worked either.  Is what I'm trying to do even possible?

 

The reason for using a custom MySql image is that I need to adjust "lower_case_table_names" and that is not possible using services.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

101 views 2 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you