MariaDB


Set up a MariaDB SQL server. It supports multiple databases, users and permission settings. If you want to only connect from inside Home Assistant use core-mariadb as the host address.

{
  "databases": ["homeassistant"],
  "logins": [
    {
      "username": "hass",
      "host": "homeassistant",
      "password": "securePassword"
    }
  ],
  "rights": [
    {
      "username": "hass",
      "host": "homeassistant",
      "database": "homeassistant",
      "grant": "ALL PRIVILEGES ON"
    }
  ]
}

Configuration Variables

databases

(list)(Required)List of databases.

logins

(list)(Required)List of SQL accounts to create or update.

username

(string)(Required)Username for account.

host

(string)(Required)Host for account. If you need an account on multiple hosts, use ‘%’.

password

(string)(Required)Password for account.

rights

(list)(Required)List of rights to be granted.

username

(string)(Required)Username for granted rights.

host

(string)(Required)Host is a part of username like above.

database

(string)(Required)Database name on which to grant user rights.

grant

(string)(Required)SQL grant part for access too.

Home Assistant configuration

Use the following configuration in Home Assistant to use the database above:

recorder:
  db_url: mysql://hass:securePassword@core-mariadb/homeassistant