mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-14 04:46:49 +00:00
Merge pull request #4774 from JudgeDreddKLC/patch-9
update recorder docs for mariadb 10.2
This commit is contained in:
commit
b697ca3d3f
@ -162,7 +162,17 @@ Not all Python bindings for the chosen database engine can be installed directly
|
|||||||
|
|
||||||
### {% linkable_title MariaDB and MySQL %}
|
### {% linkable_title MariaDB and MySQL %}
|
||||||
|
|
||||||
For MariaDB you may have to install a few dependencies. On the Python side we use the `mysqlclient`:
|
If you are in a virtual environment, don't forget to activate it before installing the `mysqlclient` Python package described below.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pi@homeassistant:~ $ sudo su homeassistant -s /bin/bash
|
||||||
|
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, please install the correct package based on your MariaDB version.
|
||||||
|
|
||||||
|
On the Python side we use the `mysqlclient`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo apt-get install libmariadbclient-dev libssl-dev
|
$ sudo apt-get install libmariadbclient-dev libssl-dev
|
||||||
@ -176,14 +186,6 @@ $ sudo apt-get install default-libmysqlclient-dev libssl-dev
|
|||||||
$ pip3 install mysqlclient
|
$ pip3 install mysqlclient
|
||||||
```
|
```
|
||||||
|
|
||||||
If you are in a virtual environment, don't forget to activate it before installing the `mysqlclient` Python package.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
pi@homeassistant:~ $ sudo su homeassistant -s /bin/bash
|
|
||||||
homeassistant@homeassistant:~$ source /srv/homeassistant/bin/activate
|
|
||||||
(homeassistant) homeassistant@homeassistant:~$ 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.
|
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.
|
||||||
|
|
||||||
Once Home Assistant finds the database, with right level of permissions, all the required tables will then be automatically created and the data will be populated accordingly.
|
Once Home Assistant finds the database, with right level of permissions, all the required tables will then be automatically created and the data will be populated accordingly.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user