Continuous Integration with MySQL

MySQL is pre-installed on all Shippable Official images. However, we do not start it by default since not every build needs MySQL.

Starting MySQL

To start MySQL, include the following in your shippable.yml:

  - mysql

When started, MySQL binds to by default. You will need to create a database and user before using it for your builds:

    - mysql -e "CREATE USER shippable@localhost IDENTIFIED BY ''; GRANT ALL ON *.* TO shippable@localhost; FLUSH PRIVILEGES;"
    - mysql -e 'create database mytestdb;'

Advanced config

Custom startup command

To customize the startup command, you should define the SHIPPABLE_MYSQL_CMD environment variable in your yml.

For example, the following yml snippet overrides the default startup command for MySQL:

    - SHIPPABLE_MYSQL_CMD="<command>"