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.