From 313ffba048542ae0b498c9fda4b91ea9c50c02b2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 13 Feb 2017 12:50:36 +0100 Subject: [PATCH] Add pymysql (fix the slalom around pymysql and mysqlclient) --- source/_components/recorder.markdown | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/_components/recorder.markdown b/source/_components/recorder.markdown index 48b9d481bd0..14385cba0f1 100644 --- a/source/_components/recorder.markdown +++ b/source/_components/recorder.markdown @@ -92,6 +92,8 @@ If you only want to hide events from e.g. your history, take a look at the [`his | SQLite | `sqlite:///PATH/TO/DB_NAME` | | MySQL | `mysql://SERVER_IP/DB_NAME` | | MySQL           | `mysql://user:password@SERVER_IP/DB_NAME`       | +| MySQL (pymysql) | `mysql+pymysql://SERVER_IP/DB_NAME` | +| MySQL (pymysql) | `mysql+pymysql://user:password@SERVER_IP/DB_NAME` | | PostgreSQL | `postgresql://SERVER_IP/DB_NAME` | | PostgreSQL | `postgresql://scott:tiger@SERVER_IP/DB_NAME` | @@ -99,9 +101,9 @@ If you only want to hide events from e.g. your history, take a look at the [`his Not all Python bindings for the chosen database engine can be installed directly. This section contains additional details which should help you to get it working. -### {% linkable_title MYSQL %} +### {% linkable_title MySQL %} -For MySQL you may have to install a few dependencies: +For MySQL you may have to install a few dependencies. You can choose between `pymysql` and `mysqlclient`: ```bash $ sudo apt-get install libmysqlclient-dev @@ -111,7 +113,7 @@ If you are in a virtual environment, don't forget to activate it before installi ```bash pi@homeassistant:~ $ sudo -i -root@homeassistant:~# su homeassistant +root@homeassistant:~# su homeassistant homeassistant@homeassistant:/root$ cd /srv/homeassistant/homeassistant_venv/ homeassistant@homeassistant:/srv/homeassistant/homeassistant_venv$ source bin/activate (homeassistant_venv) homeassistant@homeassistant:/srv/homeassistant/homeassistant_venv$ pip3 install mysqlclient