mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-13 20:36:52 +00:00
Update recorder.markdown (#1921)
Updated to include the "native" mysqlclient package as documented in https://community.home-assistant.io/t/error-in-setting-up-recorder-with-mysql/7705/4 - verified that it works as well ;-)
This commit is contained in:
parent
c362cab93e
commit
b6d33e3a17
@ -90,8 +90,8 @@ If you only want to hide events from e.g. your history, take a look at the [`his
|
|||||||
| Database engine | `db_url` |
|
| Database engine | `db_url` |
|
||||||
| :---------------|:---------------------------------------------------------|
|
| :---------------|:---------------------------------------------------------|
|
||||||
| SQLite | `sqlite:///PATH/TO/DB_NAME` |
|
| SQLite | `sqlite:///PATH/TO/DB_NAME` |
|
||||||
| MySQL | `mysql+pymysql://SERVER_IP/DB_NAME` |
|
| MySQL | `mysql://SERVER_IP/DB_NAME` |
|
||||||
| MySQL | `mysql+pymysql://user:password@SERVER_IP/DB_NAME` |
|
| MySQL | `mysql://user:password@SERVER_IP/DB_NAME` |
|
||||||
| PostgreSQL | `postgresql://SERVER_IP/DB_NAME` |
|
| PostgreSQL | `postgresql://SERVER_IP/DB_NAME` |
|
||||||
| PostgreSQL | `postgresql://scott:tiger@SERVER_IP/DB_NAME` |
|
| PostgreSQL | `postgresql://scott:tiger@SERVER_IP/DB_NAME` |
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ For MySQL you may have to install a few dependencies:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo apt-get install libmysqlclient-dev
|
$ sudo apt-get install libmysqlclient-dev
|
||||||
$ pip3 install pymysql
|
$ pip3 install mysqlclient
|
||||||
```
|
```
|
||||||
If you are in a virtual environment, don't forget to activate it before installing the pymysql package.
|
If you are in a virtual environment, don't forget to activate it before installing the pymysql package.
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ pi@homeassistant:~ $ sudo -i
|
|||||||
root@homeassistant:~# su homeassistant
|
root@homeassistant:~# su homeassistant
|
||||||
homeassistant@homeassistant:/root$ cd /srv/homeassistant/homeassistant_venv/
|
homeassistant@homeassistant:/root$ cd /srv/homeassistant/homeassistant_venv/
|
||||||
homeassistant@homeassistant:/srv/homeassistant/homeassistant_venv$ source bin/activate
|
homeassistant@homeassistant:/srv/homeassistant/homeassistant_venv$ source bin/activate
|
||||||
(homeassistant_venv) homeassistant@homeassistant:/srv/homeassistant/homeassistant_venv$ pip3 install pymysql
|
(homeassistant_venv) homeassistant@homeassistant:/srv/homeassistant/homeassistant_venv$ pip3 install mysqlclient
|
||||||
```
|
```
|
||||||
|
|
||||||
### {% linkable_title PostgreSQL %}
|
### {% linkable_title PostgreSQL %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user