Follow these steps to get the app (formerly known as add-on) installed on your system:
- In Home Assistant, go to Settings > Apps > Install app.
- Find the "MariaDB" app and click it.
- Click on the "INSTALL" button.
- Set the
logins->passwordfield to something strong and unique. - Start the app.
- Check the app log output to see the result.
- Add the
recorderintegration to your Home Assistant configuration.
The MariaDB server app can be tweaked to your likings. This section describes each of the app configuration options.
Example app configuration:
databases:
- homeassistant
logins:
- username: homeassistant
password: PASSWORD
- username: read_only_user
password: PASSWORD
rights:
- username: homeassistant
database: homeassistant
- username: read_only_user
database: homeassistant
privileges:
- SELECTDatabase name, e.g., homeassistant. Multiple are allowed.
This section defines a create user definition in MariaDB. Create User documentation.
Database user login, e.g., homeassistant. User Name documentation.
Password for user login. This should be strong and unique.
This section grant privileges to users in MariaDB. Grant documentation.
This should be the same user name defined in logins -> username.
This should be the same database defined in databases.
A list of privileges to grant to this user from grant like SELECT and CREATE.
If omitted, grants ALL PRIVILEGES to the user. Restricting privileges of the user
that Home Assistant uses is not recommended but if you want to allow other applications
to view recorder data should create a user limited to read-only access on the database.
Some users have experienced errors during Home Assistant schema updates on large databases. Defining the recommended parameters can help if there is RAM available.
Example: --innodb_buffer_pool_size=512M
MariaDB will be used by the recorder and history components within Home Assistant. For more information about setting this up, see the recorder integration documentation for Home Assistant.
Example Home Assistant configuration:
recorder:
db_url: mysql://homeassistant:password@core-mariadb/homeassistant?charset=utf8mb4Got questions?
You have several options to get them answered:
- The Home Assistant Discord Chat Server.
- The Home Assistant Community Forum.
- Join the Reddit subreddit in /r/homeassistant
In case you've found a bug, please open an issue on our GitHub.