From 1a111cd66d6cc50497c129fdf6b32a8c055cd363 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 12 Jul 2020 01:57:28 -1000 Subject: [PATCH] Point users towards mysql without pymysql first. (#13978) * Point users towards mysql without pymysql first. * Update recorder.markdown * Update recorder.markdown --- source/_integrations/recorder.markdown | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/_integrations/recorder.markdown b/source/_integrations/recorder.markdown index 2f18f1d7b50..23943570cac 100644 --- a/source/_integrations/recorder.markdown +++ b/source/_integrations/recorder.markdown @@ -212,11 +212,11 @@ Note that purging will not immediately decrease disk space usage but it will sig | Database engine | `db_url` | | :----------------------------- | :------------------------------------------------------------------------------------------- | | SQLite | `sqlite:////PATH/TO/DB_NAME` | -| MariaDB | `mysql+pymysql://SERVER_IP/DB_NAME?charset=utf8` | -| MariaDB | `mysql+pymysql://user:password@SERVER_IP/DB_NAME?charset=utf8` | | MariaDB (omit pymysql) | `mysql://user:password@SERVER_IP/DB_NAME?charset=utf8` | | MySQL | `mysql://SERVER_IP/DB_NAME?charset=utf8` | | MySQL | `mysql://user:password@SERVER_IP/DB_NAME?charset=utf8` | +| MariaDB | `mysql+pymysql://SERVER_IP/DB_NAME?charset=utf8` | +| MariaDB | `mysql+pymysql://user:password@SERVER_IP/DB_NAME?charset=utf8` | | PostgreSQL | `postgresql://SERVER_IP/DB_NAME` | | PostgreSQL | `postgresql://user:password@SERVER_IP/DB_NAME` | | PostgreSQL (Socket) | `postgresql://@/DB_NAME` | @@ -231,7 +231,9 @@ Some installations of MariaDB/MySQL may require an ALTERNATE_PORT (3rd-party hos
-If using an external MariaDB backend (e.g., running on a separate NAS) with Home Assistant, you should omit `pymysql` from the URL. `pymysql` is not included in the base Docker image, and is not necessary for this to work. +When using a MariaDB or MySQL server, adding `+pymysql` to the URL will use the pure Python MySQL library, which is slower but may be required if the C MySQL library is not available. + +When using the official Docker image, the C MySQL library will always be available. `pymysql` is most commonly used with `venv` where the C MySQL library is not installed.