Database connection using Mysql

circle.yml

#1

Just dropping this here so anyone using SpringBoot and wants to perform integration test can use it… (I saw it in other topics, so I put 2 and 2 together)

## Customize the test machine
machine:

  timezone:
    America/Chicago # Set the timezone

  # Version of ruby to use
  java:
      version:
        oraclejdk8

## Customize database setup
database:
  override:
    - echo "CREATE USER IF NOT EXISTS 'username'@'localhost' IDENTIFIED BY 'password'" | mysql -u root
    - echo "GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' WITH GRANT OPTION" | mysql -u root
    - echo "FLUSH PRIVILEGES" | mysql -u root
    - echo "CREATE DATABASE IF NOT EXISTS Your-Database" | mysql -u root

So in SpringBoot if you have the default integration test, and needs db connection, this is good to go!


#2