From d71571d34ce6e547eed93ec262104a2efa9378a2 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Thu, 21 Sep 2017 12:38:21 +0800 Subject: Do not use strict mode in MySQL, it's breaking stuffs See: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12841#note_40884022 --- config/database.yml.mysql | 3 +++ doc/install/database_mysql.md | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/config/database.yml.mysql b/config/database.yml.mysql index eb71d3f5fe1..08f2580de75 100644 --- a/config/database.yml.mysql +++ b/config/database.yml.mysql @@ -10,6 +10,7 @@ production: pool: 10 username: git password: "secure password" + strict: false # host: localhost # socket: /tmp/mysql.sock @@ -25,6 +26,7 @@ development: pool: 5 username: root password: "secure password" + strict: false # host: localhost # socket: /tmp/mysql.sock @@ -40,6 +42,7 @@ test: &test pool: 5 username: root password: + strict: false # host: localhost # socket: /tmp/mysql.sock prepared_statements: false diff --git a/doc/install/database_mysql.md b/doc/install/database_mysql.md index 5c128f54a76..17f291f97e6 100644 --- a/doc/install/database_mysql.md +++ b/doc/install/database_mysql.md @@ -264,6 +264,20 @@ Ensure your GitLab database configuration file uses a proper connection encoding [Restart your GitLab instance](../administration/restart_gitlab.md). +## Disable MySQL strict mode + +Due to various reasons, and the complexity involved with it, we don't support +running MySQL in strict mode. + +Ensure your GitLab database configuration file disable strict mode: + +```sudo -u git -H editor config/database.yml``` + + production: + adapter: mysql2 + strict: false + +[Restart your GitLab instance](../administration/restart_gitlab.md). ## MySQL strings limits -- cgit v1.2.1