Deploy MySQL

As an alternative data store to Postgres, you can deploy MySQL. Cycleops makes simple to deploy MySQL on your infrastructure in just a few steps:

  1. Follow the steps in "Deploy your first container"
  2. Edit the configuration of the service you created in the guide with:
    • Image: mysql
    • Tag: 8
    • Env vars:
      MYSQL_DATABASE=change-this-database-name
      MYSQL_USER=change-this-user
      MYSQL_PASSWORD=change-this-password
      MYSQL_ROOT_PASSWORD=change-this-password
    • Volumes: mysql_data:/var/lib/mysql/data
  3. Deploy the setup you created to run the MySQL container on your host
  4. Connect to MySQL from the MySQL command line client Now, you can verify that your MYSQL container is running and operating successfully:
    docker run -it --network cycleops --rm mysql mysql -h change-this-database-name -u change-this-user -p