sql setup

This commit is contained in:
2026-05-26 00:47:01 -04:00
parent 981d26d003
commit 5714bec389
10 changed files with 325 additions and 0 deletions
+32
View File
@@ -32,6 +32,20 @@
},
"rpc": {
"timeout_ms": 5000
},
"mysql": {
"enabled": false,
"host": "127.0.0.1",
"port": 3306,
"database": "kweebec",
"user": "kweebec",
"password": null,
"max_pool_size": 10,
"min_idle": 2,
"connection_timeout_ms": 5000,
"idle_timeout_ms": 600000,
"max_lifetime_ms": 1800000,
"use_ssl": false
}
}
```
@@ -78,6 +92,23 @@
|---|---|---|
| `timeout_ms` | `5000` | How long an RPC request waits for a response before completing the future exceptionally with `TimeoutException`. |
### mysql
| Field | Default | Meaning |
|---|---|---|
| `enabled` | `false` | Master switch. When false, `getDatabase()` returns null and no pool is created. Set to true once you've put real credentials in place. |
| `host` | `"127.0.0.1"` | MySQL host. |
| `port` | `3306` | MySQL port. |
| `database` | `"kweebec"` | Database (schema) name. Must exist before NetworkCore boots; we don't auto-create databases. |
| `user` | `"kweebec"` | MySQL user. |
| `password` | `null` | MySQL password. Prefer the env var. |
| `max_pool_size` | `10` | Hikari `maximumPoolSize`. |
| `min_idle` | `2` | Hikari `minimumIdle`. |
| `connection_timeout_ms` | `5000` | Hikari `connectionTimeout`. |
| `idle_timeout_ms` | `600000` (10 min) | Hikari `idleTimeout`. |
| `max_lifetime_ms` | `1800000` (30 min) | Hikari `maxLifetime`. Keep below MySQL's `wait_timeout`. |
| `use_ssl` | `false` | Adds `useSSL=true` to the JDBC URL. Turn on whenever MySQL is on a different host than the Hytale server. |
## Environment variable overrides
These take precedence over the config file at boot time. Use them for secrets so the config file stays safe to check into version control.
@@ -86,6 +117,7 @@ These take precedence over the config file at boot time. Use them for secrets so
|---|---|
| `REDIS_PASSWORD` | `redis.password` |
| `NETWORK_AUTH_TOKEN` | `network.auth_token` |
| `MYSQL_PASSWORD` | `mysql.password` |
## Recommended setup per environment