Missed Team ’24? Catch up on announcements here.

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

Multiple Mysql Instances in bitbucket pipelines

jordanvector
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!
November 27, 2017

I am wondering if it is possible to spin up two different databases on the same mysql instance in bitbucket pipelines during testing

2 comments

Nathan_Rzepecki April 19, 2018

Did you work this out?

Alex Bergin July 12, 2018

You could call the mysql client with the root password to create another database, like so:

image: php:7.2-fpm-alpine
pipelines: 
  default: 
    - step: 
        script: 
          - ... 
          - RUN apk add mysql-client
- mysql -u root -pyo -h 127.0.0.1 -e "CREATE DATABASE pipelines_secondary"
- ...
services: - mysql definitions: services: mysql: image: mysql:5.7 environment: MYSQL_DATABASE: 'pipelines' MYSQL_ROOT_PASSWORD: 'yo' MYSQL_USER: 'test_user' MYSQL_PASSWORD: 'test_user_password'

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events