The MySQL storage provider which supports both MySQL and MariaDB.

Version support

When using MySQL or MariaDB we recommend using the latest version that is officially supported by the MySQL or MariaDB developers. We also suggest checking out PostgreSQL as an alternative.

The oldest versions that have been tested are MySQL 5.7 and MariaDB 10.6.

If using MySQL 5.7 or MariaDB 10.6 you may be required to adjust the explicit_defaults_for_timestamp setting. This will be evident when the container starts with an error similar to Error 1067: Invalid default value for 'exp'. You can adjust this setting in the mysql.cnf file like so:

explicit_defaults_for_timestamp = 1


  encryption_key: a_very_important_secret
    port: 3306
    database: authelia
    username: authelia
    password: mypassword
    timeout: 5s



See the encryption_key docs.


string localhost not required

The database server host.

If utilising an IPv6 literal address it must be enclosed by square brackets and quoted:

host: "[fd00:1111:2222:3333::1]"


integer 3306 not required

The port the database server is listening on.


string required

The database name on the database server that the assigned user has access to for the purpose of Authelia.


string required

The username paired with the password used to connect to the database.


string required

Important Note: This can also be defined using a secret which is strongly recommended especially for containerized deployments.

The password paired with the username used to connect to the database.

It’s strongly recommended this is a Random Alphanumeric String with 64 or more characters and the user password is changed to this value.


duration 5s not required

The SQL connection timeout.