# MySQL

So before doing anything, make sure that inside the configs for both backend and proxy, the mysql credentials are correctly set. By default there's a 2 second delay between player removal/add.

{% code overflow="wrap" %}

```yaml
database:
  type: "sqlite" # mongodb, sqlite, mysql
  mysql:
    host: 'host'
    database: 'database'
    username: 'username'
    password: 'password'
```

{% endcode %}

The database type doesn't necessarily need to be mysql, you can leave it as it is normally. Make sure though that this is set to MySQL:

```yaml
# ######################################################
#                       PROXY                          #
# ######################################################
proxy:
  # Master switch for proxy functionality
  enabled: false

  # The name of this server as registered in the proxy network
  # This should match the server name in your proxy's configuration
  server_name: 'dev2'

  # Data storage method for cross-server communication
  # Available options: Redis, Lettuce, MySQL
  # Note: If using MySQL, ensure correct database details are provided in the "database" section
  storage: "mysql" # <-- !!!!

  # Redis connection settings (RECOMMENDED)
  # Only relevant if storage matches set to "redis" or "lettuce"
  redis:
    # Redis connection URI
    # Format: redis://[:password@]host[:port][/database]
    uri: "redis://:password@host:port/0"
```

Read more about the other settings inside the config itself.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.spoof.dev/asteroid/setup/features/asteroid-proxy/mysql.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
