Description:
I was playing with dbdeployer to test something and notice that while trying to start up MySQL 8.0.32 with this configuration:
[mysql]
prompt='mysql [\h:8032] {\u} (\d) > '
[client]
user = msandbox
password = msandbox
port = 8032
socket = /var/folders/s2/c11nhmq132ddb7xtltstnbb80000gn/T/mysql_sandbox8032.sock
[mysqld]
user = username
port = 8032
socket = /var/folders/s2/c11nhmq132ddb7xtltstnbb80000gn/T/mysql_sandbox8032.sock
basedir = /Users/username/opt/mysql/8.0.32
datadir = /Users/username/sandboxes/msb_8_0_32/data
tmpdir = /Users/username/sandboxes/msb_8_0_32/tmp
pid-file = /Users/username/sandboxes/msb_8_0_32/data/mysql_sandbox8032.pid
bind-address = 127.0.0.1
report-host=single-8032
report-port=8032
log-error=/Users/username/sandboxes/msb_8_0_32/data/msandbox.err
# for writing binlogs
log-bin = /Users/username/sandboxes/msb_8_0_32/log/binlog
gtid_mode = ON
binlog_format = ROW
binlog_row_image = minimal
ENFORCE_GTID_CONSISTENCY = ON
mysqlx-port=18032
mysqlx-socket=/var/folders/s2/c11nhmq132ddb7xtltstnbb80000gn/T//mysqlx-18032.sock
it fails with this error message:
023-06-15T18:54:42.6NZ mysqld_safe Starting mysqld daemon with databases from /Users/username/sandboxes/msb_8_0_32/data
2023-06-15T18:54:43.178511Z 0 [System] [MY-010116] [Server] /Users/username/opt/mysql/8.0.32/bin/mysqld (mysqld 8.0.32) starting as process 1780
2023-06-15T18:54:43.180873Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /Users/username/sandboxes/msb_8_0_32/data/ is case insensitive
2023-06-15T18:54:43.183414Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-06-15T18:54:43.297422Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-06-15T18:54:43.350029Z 0 [ERROR] [MY-010912] [Server] GTID_MODE = ON requires ENFORCE_GTID_CONSISTENCY = ON.
2023-06-15T18:54:43.350050Z 0 [ERROR] [MY-010119] [Server] Aborting
.2023-06-15T18:54:44.395352Z 0 [System] [MY-010910] [Server] /Users/username/opt/mysql/8.0.32/bin/mysqld: Shutdown complete (mysqld 8.0.32) MySQL Community Server - GPL.
2023-06-15T18:54:44.6NZ mysqld_safe mysqld from pid file /Users/username/sandboxes/msb_8_0_32/data/mysql_sandbox8032.pid ended
Note: I am using exactly the configuration specified !!
Even changing the value to:
ENFORCE_GTID_CONSISTENCY = 1
does not work, giving the same error.
In the end the correct configuration setting to use is:
enforce_gtid_consistency = 1
which leads to:
2023-06-15T18:57:08.6NZ mysqld_safe Logging to '/Users/username/sandboxes/msb_8_0_32/data/msandbox.err'.
2023-06-15T18:57:08.6NZ mysqld_safe Starting mysqld daemon with databases from /Users/username/sandboxes/msb_8_0_32/data
2023-06-15T18:57:09.195479Z 0 [System] [MY-010116] [Server] /Users/username/opt/mysql/8.0.32/bin/mysqld (mysqld 8.0.32) starting as process 3063
2023-06-15T18:57:09.197147Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /Users/username/sandboxes/msb_8_0_32/data/ is case insensitive
2023-06-15T18:57:09.200358Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-06-15T18:57:09.290337Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
.2023-06-15T18:57:09.378963Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-06-15T18:57:09.378997Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-06-15T18:57:09.386560Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 18032, socket: /var/folders/s2/c11nhmq132ddb7xtltstnbb80000gn/T//mysqlx-18032.sock
2023-06-15T18:57:09.386587Z 0 [System] [MY-010931] [Server] /Users/username/opt/mysql/8.0.32/bin/mysqld: ready for connections. Version: '8.0.32' socket: '/var/folders/s2/c11nhmq132ddb7xtltstnbb80000gn/T/mysql_sandbox8032.sock' port: 8032 MySQL Community Server - GPL.
sandbox server started
I sort of knew this but usually use automated configuration generation but basically the error message is just wrong. It's confusing setttings in /etc/my.cnf from the GLOBAL_VARIABLE setttings and also the 0/1 from OFF/ON.
Either way the error as it stands is wrong or at least incomplete.
How to repeat:
See above.
Suggested fix:
Adapt the message to provide a better report on the required configuration setting, so the user can adjust his/her configuration accordingly and start to use MySQL more quickly.