cptactionhank / docker-atlassian-jira-software

Atlassian JIRA Software wrapped in a Docker image
https://cptactionhank.github.io/docker-atlassian-jira-software
MIT License
270 stars 168 forks source link

Connecting to MySQL #34

Closed dimqakolyada closed 6 years ago

dimqakolyada commented 6 years ago

Hi! First of all thank you for your work. Please, help me to solve my problem. I'm just learning to work with a docker. I try to connect jira to mysql in other docker container. I use this docker-compose.yml:

version: '3'
services:
    jira:
        container_name: jira
        image: cptactionhank/atlassian-jira-software:latest
        ports:
          - "8080:8080"

    mysql:
        container_name: mysql
        image: mysql:8
        ports:
            - "3306:3306"
        volumes:
            - ./mysql:/var/lib/mysql
        environment:
            MYSQL_ROOT_PASSWORD: secret

When I try to install jira and connect it to MySQL, I get error

Error connecting to database Could not create connection to database server. null

I set: Database Connection: My Own Database (recommended for production environments) Database Type: MySQL Hostname: mysql Port: 3306 Database: test (I created this database in advance) Username: root Password: secret

Please tell me, what am I doing wrong?