Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can't connect to mysql in the bitbucket pipeline

Adrian Gier
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!
May 18, 2019

Hi !

i am preparing a CI Pipeline for Laravel with SonarCloud.

 

But the migration always fails with "connection refused"

PDOException::("SQLSTATE[HY000] [2002] Connection refused")

 

Here is my bitbucket-pipelines.yml

https://pastebin.com/Zc0MhAzS

And this is the env.pipelines

https://pastebin.com/rDSnrmMg

 

Perhaps anyone sees the mistake. I tried to solve it for hours.

But i have no idea anymore.

 

Thanks in advance

Adrian

1 answer

1 accepted

0 votes
Answer accepted
Adrian Gier
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!
May 19, 2019

The solution was to move the 

- services

section in front of 

- script

so that the server is reachable in the script block

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events