From 699d1a91149ace8510e7cdf1a52b2004b7c6130f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Mon, 13 Sep 2021 09:52:35 +0200 Subject: [PATCH] Use configuration_basic for db_url examples for readability (#19307) --- source/_integrations/recorder.markdown | 61 ++++++++++++++++++-------- 1 file changed, 43 insertions(+), 18 deletions(-) diff --git a/source/_integrations/recorder.markdown b/source/_integrations/recorder.markdown index adff936565f..7e39856c2c2 100644 --- a/source/_integrations/recorder.markdown +++ b/source/_integrations/recorder.markdown @@ -35,7 +35,7 @@ recorder: type: map keys: db_url: - description: The URL that points to your database. + description: The URL that points to your database. Examples of these can be found [here](#custom-database-engines). required: false type: string db_max_retries: @@ -236,23 +236,48 @@ The following database engines are tested when major changes are made to the rec ## Custom database engines -| Database engine | `db_url` | -| :----------------------------- | :-------------------------------------------------------------------------------------------------------- | -| SQLite | `sqlite:////PATH/TO/DB_NAME` | -| MariaDB (omit pymysql) | `mysql://user:password@SERVER_IP/DB_NAME?charset=utf8mb4` | -| MariaDB (omit pymysql, Socket) | `mysql://user:password@SERVER_IP/DB_NAME?unix_socket=/var/run/mysqld/mysqld.sock&charset=utf8mb4` | -| MySQL | `mysql://SERVER_IP/DB_NAME?charset=utf8mb4` | -| MySQL | `mysql://user:password@SERVER_IP/DB_NAME?charset=utf8mb4` | -| MySQL (Socket) | `mysql://user:password@localhost/DB_NAME?unix_socket=/var/run/mysqld/mysqld.sock&charset=utf8mb4` | -| MariaDB | `mysql+pymysql://SERVER_IP/DB_NAME?charset=utf8mb4` | -| MariaDB | `mysql+pymysql://user:password@SERVER_IP/DB_NAME?charset=utf8mb4` | -| MariaDB (Socket) | `mysql+pymysql://user:password@localhost/DB_NAME?unix_socket=/var/run/mysqld/mysqld.sock&charset=utf8mb4` | -| PostgreSQL | `postgresql://SERVER_IP/DB_NAME` | -| PostgreSQL | `postgresql://user:password@SERVER_IP/DB_NAME` | -| PostgreSQL (Socket) | `postgresql://@/DB_NAME` | -| PostgreSQL (Custom socket dir) | `postgresql://@/DB_NAME?host=/path/to/dir` | -| MS SQL Server | `mssql+pyodbc://username:password@SERVER_IP:1433/DB_NAME?charset=utf8&driver=DRIVER` | -| Oracle | `oracle+cx_oracle://username:password@SERVER_IP:1521/DB_NAME?encoding=UTF-8&nencoding=UTF-8` | +Here are examples to use with the [`db_url`](#db_url) configuration option. + +{% configuration_basic %} + +SQLite: + description: > + `sqlite:////PATH/TO/DB_NAME` +MariaDB (omit pymysql): + description: > + `mysql://user:password@SERVER_IP/DB_NAME?charset=utf8mb4` +MariaDB (omit pymysql, Socket): + description: > + `mysql://user:password@SERVER_IP/DB_NAME?unix_socket=/var/run/mysqld/mysqld.sock&charset=utf8mb4` +MySQL: + description: > + `mysql://user:password@SERVER_IP/DB_NAME?charset=utf8mb4` +MySQL (Socket): + description: > + `mysql://user:password@localhost/DB_NAME?unix_socket=/var/run/mysqld/mysqld.sock&charset=utf8mb4` +MariaDB: + description: > + `mysql+pymysql://user:password@SERVER_IP/DB_NAME?charset=utf8mb4` +MariaDB (Socket): + description: > + `mysql+pymysql://user:password@localhost/DB_NAME?unix_socket=/var/run/mysqld/mysqld.sock&charset=utf8mb4` +PostgreSQL: + description: > + `postgresql://user:password@SERVER_IP/DB_NAME` +PostgreSQL (Socket): + description: > + `postgresql://@/DB_NAME` +PostgreSQL (Custom socket dir): + description: > + `postgresql://@/DB_NAME?host=/path/to/dir` +MS SQL Server: + description: > + `mssql+pyodbc://username:password@SERVER_IP:1433/DB_NAME?charset=utf8&driver=DRIVER` +Oracle: + description: > + `oracle+cx_oracle://username:password@SERVER_IP:1521/DB_NAME?encoding=UTF-8&nencoding=UTF-8` + +{% endconfiguration_basic %}