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

Unable to connect to MySql8.0

dipankardas September 7, 2023

My bitbucket-pipelines.yml script was working fine a couple of commits ago. Now, I see the following error. Please find attached a screenshot of the same.

ERROR 2002 (HY000): Can't connect to MySQL server on '127.0.0.1' (115)

Attaching my bitbucket-pipelines.yml as well. 

I checked the forum and tried a recommended solution to move the - services section above the -script section. But it didn't work, either.

Any help would be appreciated.

Thanks

Dipankarbitbucket_error.jpgbitbucket-pipelines.yml.jpg 

1 answer

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 8, 2023

Hi Dipankar,

One limitation of Bitbucket Pipelines is that there is no mechanism to wait for service startup. The build may be failing because the mysql service hasn't started yet.

I tried running a build with a bitbucket-pipelines.yml file similar to yours and I got the same error. Adding a sleep command for 5 seconds:

- sleep 5

before the mysql command solved the issue for me. Could you give it a try and let me know if it works?

We have a request in our issue tracker to have the build wait until all services are ready:

You can add your vote (by selecting the Vote for this issue link) and feedback to it if you'd be interested in that.

Kind regards,
Theodora

dipankardas September 9, 2023

It really did resolve my issue. You're awesome @Theodora Boudale ! Appreciate the prompt response and registering the issue in the backlog.

Thanks

Dipankar

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 11, 2023

That's good to hear Dipankar and you are very welcome!

Please feel free to reach out if you ever need anything else!

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events