<- Back to Index

MariaDB

To run SQL-LRS with MariaDB, you need a properly configured MariaDB instance. "Properly configured" really just means setting up a database, user, and password, and configuring SQL-LRS to connect to/with those.

Environment Variables

You can configure MariaDB by setting the relevant environment variables. Here is the environment entry from our MariaDB docker-compose demo

    environment:
      MARIADB_ROOT_PASSWORD: lrsql_root_password 
      MARIADB_DATABASE: lrsql_db
      MARIADB_USER: lrsql_user
      MARIADB_PASSWORD: lrsql_password

Note that MARIADB_ROOT_PASSWORD is only required if running in a container; see the MariaDB docs for details.

The corresponding lrsql.json would look like

{
  ...
  "database": {
    "dbHost": "0.0.0.0",
    "dbPort": 3306,
    "dbName": "lrsql_db",
    "dbUser": "lrsql_user",
    "dbPassword": "lrsql_password",
  }
}