User Guides

Database Configuration

The database config controls how LexasCMS connects to your websites database. You can override the default configuration by creating a new config file named database.yaml in your chosen configuration directory.


Possible Keys

The possible config keys can be found in the table below along with descriptions and the default values.

Key Base value (default) Description
driver sqlite The type of database being connected to. Possible values are mysql (MySQL/MariaDB) or sqlite
host null The hostname of the database server
port null The port to connect to the database server through
user null Database users username
password null Database users password
schema null Database schema name

Example

Below is a simple example of what a database config file may look like.

driver: mysql
host: db.somehost.com
port: 3306
user: someuser
password: somepassword
schema: myschema