mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-22 16:56:50 +00:00
Update recorder documentation to clarify which versions and engine are supported (#26036)
* Update recorder documentation to clarify which versions and engine are supported * Update recorder.markdown
This commit is contained in:
parent
31901111b5
commit
5a111f2d39
@ -227,15 +227,6 @@ Call the service `recorder.disable` to stop saving events and states to the data
|
||||
|
||||
Call the service `recorder.enable` to start again saving events and states to the database. This is the opposite of `recorder.disable`.
|
||||
|
||||
## Recommended engines and minimum versions
|
||||
|
||||
The following database engines are tested when major changes are made to the recorder. Other database engines do not have an active core maintainer at this time and may require additional work to maintain.
|
||||
|
||||
- SQLite ≥ 3.32.1
|
||||
- MariaDB ≥ 10.3
|
||||
- MySQL ≥ 8.0
|
||||
- PostgreSQL ≥ 12
|
||||
|
||||
## Custom database engines
|
||||
|
||||
Here are examples to use with the [`db_url`](#db_url) configuration option.
|
||||
@ -335,6 +326,10 @@ Not all Python bindings for the chosen database engine can be installed directly
|
||||
|
||||
### MariaDB and MySQL
|
||||
|
||||
<div class='note warning'>
|
||||
MariaDB versions before 10.5.17, 10.6.9, 10.7.5, and 10.8.4 suffer from a performance regression which can result in the system becoming overloaded while querying history data or purging the database.
|
||||
</div>
|
||||
|
||||
Make sure the default character set of your database server is set to `utf8mb4` (see [MariaDB documentation](https://mariadb.com/kb/en/setting-character-sets-and-collations/#example-changing-the-default-character-set-to-utf-8)).
|
||||
If you are in a virtual environment, don't forget to activate it before installing the `mysqlclient` Python package described below.
|
||||
|
||||
@ -344,7 +339,7 @@ homeassistant@homeassistant:~$ source /srv/homeassistant/bin/activate
|
||||
(homeassistant) homeassistant@homeassistant:~$ pip3 install mysqlclient
|
||||
```
|
||||
|
||||
For MariaDB you may have to install a few dependencies. If you're using MariaDB version 10.2, `libmariadbclient-dev` was renamed to `libmariadb-dev`. If you're using MariaDB 10.3, the package `libmariadb-dev-compat` must also be installed. For MariaDB v10.0.34 only `libmariadb-dev-compat` is needed. Please install the correct packages based on your MariaDB version.
|
||||
For MariaDB you may have to install a few dependencies. If you're using MariaDB 10.3, the package `libmariadb-dev-compat` must also be installed. Please install the correct packages based on your MariaDB version.
|
||||
|
||||
On the Python side we use the `mysqlclient`:
|
||||
|
||||
@ -362,6 +357,8 @@ pip3 install mysqlclient
|
||||
|
||||
After installing the dependencies, it is required to create the database manually. During the startup, Home Assistant will look for the database specified in the `db_url`. If the database doesn't exist, it will not automatically create it for you.
|
||||
|
||||
The database engine must be `InnoDB` as `MyIASM` is not supported.
|
||||
|
||||
```bash
|
||||
SET GLOBAL default_storage_engine = 'InnoDB';
|
||||
CREATE DATABASE DB_NAME CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
Loading…
x
Reference in New Issue
Block a user