Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Usama Habib July 31, 2019

Hi all i am experiencing this error i have went through this link 

https://community.atlassian.com/t5/Bitbucket-questions/How-do-I-use-MySQL-in-Bitbucket-Pipelines/qaq-p/461906 

in this link @Alfred_Bez was also experiencing the same error but for him he didn't have mentioned the service tag in his file for me i have mentioned everything that yml file is working but sometimes it throws me this error and then if i re run pipeline for the same it builds successfully my concern is in a production environment i can not neglect this i want to resolve it

Below is the issue and my pipeline configuration

pipeline issue.png

 

 

Screen Shot 2019-07-31 at 1.48.15 PM.png

it always breaks at third step of the file and when you re run the same it builds successfully. if there is anything i am doing wrong or any solution to this will be highly appreciated 

Thanks 

1 answer

1 vote
Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 2, 2019

Hello,

My initial suspicion is that the database is still starting up in the builds that fail. You can look at the logs in mysql tab of the build logs to see if it finished starting up.

The quickest way to work around this issue is to add a sleep to the build. However, there may be more effective ways to work around this once you know if the issue is startup time.

Thanks,

Phil

Sven Haveman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 1, 2022

Thanks Philip! This fixed my issue.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events