> For the complete documentation index, see [llms.txt](https://documentation.rcore.cz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.rcore.cz/paid-resources/rcore_prison/integrations/database.md).

# Database

`rcore_prison` requires a MySQL database connector to store prisoner data and other persistent records.

## 🔎 Auto Detection

```lua
Config.Database = AUTO_DETECT
```

Auto-detection priority (first match wins): `OX` → `MYSQL_ASYNC` → `GHMATTI`.

Override with the matching constant if detection picks the wrong one:

| Constant               | Resource                                                                    |
| ---------------------- | --------------------------------------------------------------------------- |
| `Database.OX`          | `oxmysql`                                                                   |
| `Database.MYSQL_ASYNC` | `mysql-async`                                                               |
| `Database.GHMATTI`     | `ghmattimysql`                                                              |
| `Database.NONE`        | No database connector found - `rcore_prison` cannot run without a database. |

{% hint style="warning" %}
Leave it on `AUTO_DETECT` if you're running one of the supported database connectors (recommended).
{% endhint %}
