# Run MySQL database outside of Docker

**URL:** <https://community.temporal.io/t/run-mysql-database-outside-of-docker/2694>\
**Category:** Community Support\
**Tags:** mysql\
**Created:** [August 11, 2021, 5:47pm UTC](https://community.temporal.io/t/run-mysql-database-outside-of-docker/2694 "2021-08-11T17:47:56Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)\
**Post date:** [June 13, 2022, 5:58pm UTC](https://community.temporal.io/t/run-mysql-database-outside-of-docker/2694/9 "2022-06-13T17:58:30Z")

</div>

This is the docker compose file I used to connect to mysql running locally (note it uses auto-setup image):

```auto

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](https://github.com/temporalio/temporal/blob/master/docker/config_template.yaml) to see how certain env vars are mapped and their defaults.

---

_[View the full topic](https://community.temporal.io/t/run-mysql-database-outside-of-docker/2694)._
