Forums

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

[build] SQLSTATE[HY000] [2002] Connection timed out

Dev1
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!
July 3, 2025

Hello,

My YML file, but facing issue [build] SQLSTATE[HY000] [2002] Connection timed out :
Please explain why this happend.

image: quay.io/hypernode/deploy:3-php8.1-node18

pipelines:
  branches:
    staging:
      - step:
          name: Build
          script:
            - hypernode-deploy build -vvv
            - php deploy-static.php
          services:
          - mysql
          artifacts:
            - build/**
          caches:
            - composer

      - step:
          name: Deploy
          deployment: staging
          script:
            - mkdir -p ~/.ssh
            - echo "$SSH_PRIVATE_KEY" | base64 --decode > ~/.ssh/id_rsa
            - chmod 600 ~/.ssh/id_rsa
            - eval "$(ssh-agent -s)"
            - ssh-add ~/.ssh/id_rsa
            - ssh-keyscan smartblindsdev.hypernode.io >> ~/.ssh/known_hosts
            - hypernode-deploy deploy staging -vvv
            - php deploy-static.php
definitions:
  services:
    mysql:
      image: mysql:5.7
      variables:
        MYSQL_DATABASE: 'smartblindsdev_db'
        MYSQL_USER: 'app'
        MYSQL_PASSWORD: 'ssMUvjGwv9RxVCxStelHBIeydjsnFDaw'
        MYSQL_RANDOM_ROOT_PASSWORD: 'yes'

1 answer

0 votes
Jim Knepley - ReleaseTEAM
Atlassian Partner
July 3, 2025

Hi @Dev1. Welcome to the community.

"Connection timed out" means that the build runner tried to connect to a system (like a database) and didn't get a response. This is different from "Connection refused," which indicates the remote system actively rejecting the connection, usually because the service isn't running.

In my experience, your error is a network connectivity issue, often caused by a firewall or ACL between the runner and the database, or sometimes a misconfigured route between subnets.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events