From c75eddb730d2cb96bf5dac7f7cc6005e2cf5a36e Mon Sep 17 00:00:00 2001 From: Chico Venancio Date: Fri, 8 Jun 2018 12:55:02 -0300 Subject: [PATCH] database docs utfmb4 collation and some versions of mysql/mariadb --- docs/source/reference/database.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/source/reference/database.md b/docs/source/reference/database.md index 35d8d07f..25f01839 100644 --- a/docs/source/reference/database.md +++ b/docs/source/reference/database.md @@ -42,7 +42,7 @@ We recommend using PostgreSQL for production if you are unsure whether to use MySQL or PostgreSQL or if you do not have a strong preference. There is additional configuration required for MySQL that is not needed for PostgreSQL. -### MySQL +### MySQL / MariaDB - You should use the `pymysql` sqlalchemy provider (the other one, MySQLdb, isn't available for py3). @@ -52,7 +52,11 @@ additional configuration required for MySQL that is not needed for PostgreSQL. from the hub will be idle for longer than most connections. This behavior will lead to frustrating 'the connection has gone away' errors from sqlalchemy if `pool_recycle` is not set. - - - - +- If you use utf8mb4 collation with MySQL earlier than 5.7.7 or MariaDB earlier + than 10.2.1 you may get an '1709, Index column size too large' error. To fix + this you need to set 'innodb_large_prefix' to enabled and + 'innodb_file_format' to 'Barracuda' to allow for the index sizes jupyterhub + uses. 'row_format' will be set to 'DYNAMIC' as long as those options are set + correctly. Later versions of MariaDB and MySQL should set these values by + default, as well as have a default DYNAMIC row_format and pose no trouble to + users.