Database Settings
📦 Database Settings
LiteEco supports multiple database types for storing plugin data, including SQLite, MySQL, MariaDB, and PostgreSQL.
You can configure the database connection in the config.yml file under the database: section.
⚙️ Configuration Example
database:
connection:
driver_class_name: "org.sqlite.JDBC"
jdbc_url: "jdbc:sqlite:plugins/LiteEco/database.db"
username: user_name
password: password
sql_plugin_logger: false
🗃️ Supported Database Types
You can use any of the following database systems by setting the appropriate driver_class_name and jdbc_url:
| Database | JDBC URL | Driver | Notes |
|---|---|---|---|
| SQLite | jdbc:sqlite:plugins/LiteEco/database.db | org.sqlite.JDBC | — |
| MySQL | jdbc:mysql://your_host:port/name_of_database | com.mysql.cj.jdbc.Driver | ⚠️ Do not use with MariaDB v11.x+ |
| MariaDB | jdbc:mariadb://your_host:port/name_of_database | org.mariadb.jdbc.Driver | 🔗 Driver issue reference |
| PostgreSQL | jdbc:postgresql://your_host:port/name_of_database | org.postgresql.Driver | — |
🔐 Authentication
For MySQL and MariaDB, you must provide:
username: The database userpassword: The user's password
These are not required for SQLite.
🛠️ Troubleshooting
- If you experience issues with SQL queries or connections, you can enable the plugin's internal SQL logger:
sql_plugin_logger: true
This may help with debugging database-related problems.
tip
- Always verify your
driver_class_namematches the database type you're using. - Ensure your database server allows external connections if you're hosting it remotely.
- When using SQLite, no external server is required – the database is stored locally.