Add TLS and utf8mb4 for MariaDB (#19793)

This commit is contained in:
Daniel Rheinbay 2021-10-17 19:12:53 +02:00 committed by GitHub
parent 4e43c3f0ce
commit f094d68d53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -246,12 +246,18 @@ SQLite:
MariaDB (omit pymysql):
description: >
`mysql://user:password@SERVER_IP/DB_NAME?charset=utf8mb4`
MariaDB (omit pymysql, using TLS encryption):
description: >
`mysql://user:password@SERVER_IP/DB_NAME?charset=utf8mb4;ssl=true`
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 (using TLS encryption):
description: >
`mysql://user:password@SERVER_IP/DB_NAME?charset=utf8mb4;ssl=true`
MySQL (Socket):
description: >
`mysql://user:password@localhost/DB_NAME?unix_socket=/var/run/mysqld/mysqld.sock&charset=utf8mb4`
@ -340,6 +346,7 @@ Not all Python bindings for the chosen database engine can be installed directly
### MariaDB and MySQL
Make sure the default character set of your database server is set to `utf8mb4` (see [MariaDB documentation](https://mariadb.com/kb/en/setting-character-sets-and-collations/#example-changing-the-default-character-set-to-utf-8)).
If you are in a virtual environment, don't forget to activate it before installing the `mysqlclient` Python package described below.
```bash