diff --git a/changelog.d/20231013_114747_fghaas_disable_mysql_binlog.md b/changelog.d/20231013_114747_fghaas_disable_mysql_binlog.md new file mode 100644 index 0000000000..a2f4d06cd8 --- /dev/null +++ b/changelog.d/20231013_114747_fghaas_disable_mysql_binlog.md @@ -0,0 +1 @@ +[Bugfix] Default to running MySQL 8 in a standalone configuration without [binary logging](https://dev.mysql.com/doc/refman/8.0/en/binary-log.html), as we did in Tutor 15 with MySQL 5.7. If you do need binary logging because you are running [MySQL replication](https://dev.mysql.com/doc/refman/8.0/en/replication.html), or you want to be able to do [point-in-time recovery using the binlog](https://dev.mysql.com/doc/refman/8.0/en/point-in-time-recovery-binlog.html), set `MYSQL_ENABLE_BINLOG: true` in `config.yml`. (by @fghaas) diff --git a/tutor/templates/config/defaults.yml b/tutor/templates/config/defaults.yml index 94f127226e..fb82b5708c 100644 --- a/tutor/templates/config/defaults.yml +++ b/tutor/templates/config/defaults.yml @@ -55,6 +55,7 @@ OPENEDX_MYSQL_USERNAME: "openedx" OPENEDX_COMMON_VERSION: "open-release/palm.3" OPENEDX_EXTRA_PIP_REQUIREMENTS: - "openedx-scorm-xblock>=16.0.0,<17.0.0" +MYSQL_ENABLE_BINLOG: false MYSQL_HOST: "mysql" MYSQL_PORT: 3306 MYSQL_ROOT_USERNAME: "root" diff --git a/tutor/templates/k8s/deployments.yml b/tutor/templates/k8s/deployments.yml index ff833ad1ca..9a85e29f56 100644 --- a/tutor/templates/k8s/deployments.yml +++ b/tutor/templates/k8s/deployments.yml @@ -392,7 +392,11 @@ spec: containers: - name: mysql image: {{ DOCKER_IMAGE_MYSQL }} - args: ["mysqld", "--character-set-server=utf8mb3", "--collation-server=utf8mb3_general_ci"] + args: + - "mysqld" + - "--character-set-server=utf8mb3" + - "--collation-server=utf8mb3_general_ci" + {% if not MYSQL_ENABLE_BINLOG -%}- "--disable-log-bin" {%- endif %} env: - name: MYSQL_ROOT_PASSWORD value: "{{ MYSQL_ROOT_PASSWORD }}" diff --git a/tutor/templates/local/docker-compose.yml b/tutor/templates/local/docker-compose.yml index a2ace7c57b..2bef2f20fb 100644 --- a/tutor/templates/local/docker-compose.yml +++ b/tutor/templates/local/docker-compose.yml @@ -40,7 +40,11 @@ services: {% if RUN_MYSQL -%} mysql: image: {{ DOCKER_IMAGE_MYSQL }} - command: mysqld --character-set-server=utf8mb3 --collation-server=utf8mb3_general_ci + command: > + mysqld + --character-set-server=utf8mb3 + --collation-server=utf8mb3_general_ci + {% if not MYSQL_ENABLE_BINLOG -%}--disable-log-bin{%- endif %} restart: unless-stopped user: "999:999" volumes: