summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-09-21 12:38:21 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-09-21 12:52:39 +0800
commitd71571d34ce6e547eed93ec262104a2efa9378a2 (patch)
treef2d2ece65df08a7c344f1407d1b46633e9f81330
parent47f172bc8a280595cc6cb816f132d011b9a649ee (diff)
downloadgitlab-ce-disable-strict-mode-for-mysql.tar.gz
Do not use strict mode in MySQL, it's breaking stuffsdisable-strict-mode-for-mysql
See: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12841#note_40884022
-rw-r--r--config/database.yml.mysql3
-rw-r--r--doc/install/database_mysql.md14
2 files changed, 17 insertions, 0 deletions
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