Skip to content

Latest commit

 

History

History
56 lines (35 loc) · 1.78 KB

README.md

File metadata and controls

56 lines (35 loc) · 1.78 KB

Setting up MySQL

Run a database in the cloud

The easiest way to try out this example is by running a database in the cloud.

If you don't have a database running in the cloud yet, you can try our read-only mocked MySQL database:

Click to show credentials!
  • host: db.introspection.stepzen.net
  • database: introspection
  • username: testUserIntrospection
  • password: HurricaneStartingSample1934

Creating a local database

The best way to run this MySQL Database is by using our Docker. This requires you to have Docker installed (no prior knowledge needed) and using ngrok to create a TCP tunnel so you can link it to StepZen.

Prerequisites

Getting Started:

Make sure you have an account for ngrok and have linked your authtoken by running:

ngrok authtoken [YOUR_AUTH_TOKEN]

After doing so start the Docker container with the MySQL database from this directory:

cd mysql
docker-compose up -d

This will start the container with the MySQL server, makes it available on port 3306 and prepopulates it with the data from ./mysql/init.sql.

Using with cloud

To make this database available to other services outside your private network, you need to create a TCP tunnel. For this ngrok will be used:

ngrok tcp 3306

Ngrok will return the forwarding address for the local MySQL database, which will looks something like this: tcp://0.tcp.ngrok.io:15650.

You need to add use this address (without tcp://) as the host when running stepzen import mysql. Together with the credentials in docker-compose.yml.