Skip to main content

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:

DatabaseJDBC URLDriverNotes
SQLitejdbc:sqlite:plugins/LiteEco/database.dborg.sqlite.JDBC—
MySQLjdbc:mysql://your_host:port/name_of_databasecom.mysql.cj.jdbc.Driver⚠️ Do not use with MariaDB v11.x+
MariaDBjdbc:mariadb://your_host:port/name_of_databaseorg.mariadb.jdbc.Driver🔗 Driver issue reference
PostgreSQLjdbc:postgresql://your_host:port/name_of_databaseorg.postgresql.Driver—

🔐 Authentication​

For MySQL and MariaDB, you must provide:

  • username: The database user
  • password: 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_name matches 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.