How does one run temporal.io with a MySQL back-end database that is not running in Docker? i.e. it runs on a separate host than temporal.? For example, how is the MySQL endpoint made known to the temporal server? How is the schema defined?
See the Peristence section from the configuration documentation page.
Ok, but why not put out a simple yml for this case. The link points to a cassandra config. Most developers using mysql will already have it on their machine, and would like to use that, and simply start the temporal server separately. Also, the script to setup the schema which temporal needs. All of this would be really helpful to get going, rather than spending time figuring out config.
Hi @amcf86, check out the configs in the temporal github repo for mysql and mysql with ES visibility setup. Hope this helps.
could u kindly share the process how were u able to achieve mysql connection to temporal
Are there any docs on how to setup a standalone MySQL?
After creating the 2 mysql db’s (temporal/development-mysql.yaml at master · temporalio/temporal · GitHub), “temporal” and "“temporal_visibility”, what next?
yah, same question here as well
how to we tell temporal to take the DB connection params from this file
This is the docker compose file I used to connect to mysql running locally (note it uses auto-setup image):
version: "3.5"
services:
temporal:
container_name: temporal
environment:
- DB=mysql
- DB_PORT=3307
- MYSQL_USER=user
- MYSQL_PWD=pass
- MYSQL_SEEDS=host.docker.internal
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development_es.yaml
- ENABLE_ES=false
- PROMETHEUS_ENDPOINT=0.0.0.0:8000
image: temporalio/auto-setup:1.16.2
ports:
- 7233:7233
- 8000:8000
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
temporal-admin-tools:
container_name: temporal-admin-tools
depends_on:
- temporal
environment:
- TEMPORAL_CLI_ADDRESS=temporal:7233
image: temporalio/admin-tools:1.16.2
stdin_open: true
tty: true
temporal-ui:
container_name: temporal-ui
depends_on:
- temporal
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CORS_ORIGINS=http://localhost:3000
image: temporalio/ui:latest
ports:
- 8080:8080
temporal-web:
container_name: temporal-web
depends_on:
- temporal
environment:
- TEMPORAL_GRPC_ENDPOINT=temporal:7233
- TEMPORAL_PERMIT_WRITE_API=true
- TEMPORAL_GRPC_MAX_MESSAGE_LENGTH=67108864
image: temporalio/web:1.14.0
ports:
- 8088:8088
Note I used MYSQL_SEEDS=host.docker.internal cause running on mac and mysql was running on localhost.
You can reference the config template to see how certain env vars are mapped and their defaults.
Ok thanks.