Database Scaling
SQLite or MySQL?
| SQLite | MySQL | |
|---|---|---|
| Setup | None | Needs a MySQL server and credentials |
| Best for | One bot, small to medium servers | Many servers, shared hosting, or external backups |
| Data location | tickets.db next to the bot |
Your MySQL server |
Start on SQLite. Move to MySQL when you want the data off the bot's disk, need managed backups, or run the bot across containers that don't keep local files.
Moving to MySQL
- Create the MySQL database and user.
- Update
DB_TYPEand theDB_*variables in.env. - Restart and check the console for a successful connection. A "Falling back to SQLite" message means it failed.
Existing SQLite data is not migrated automatically — a fresh MySQL database starts empty.
Transcript size
Transcripts are stored in the database, so busy servers grow it over time. Plan disk space (SQLite) or database storage (MySQL) accordingly.