添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account general_log_file = /logs/queries.log log_bin = /logs/mysql-bin.log binlog_do_db = chaostesting master_info_repository = TABLE gtid_mode = ON enforce_gtid_consistency = ON

Starting the container built from the Dockerfile above produce the following:

MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process failed.
mysql:5.6 fail to start with gtid_mode=on configuration.
mysql:5.6 fail to start with gtid_mode=on settings.
      Sep 16, 2015
          

This is the command used to start the container:

  docker run --name mysql-master -d \
    -m 2g \
    -e MYSQL_ROOT_PASSWORD=rootpassword \
    -e MYSQL_DATABASE=example \
    -p 3307:3307 \
    mysql-test # <- the image built from the above Dockerfile

I finally was able to test this and it looks like you need a log_slave_updates = TRUE in your conf file.
When I ran with your config I found that the error was a little higher up in the log:

2015-10-09 22:17:10 235 [ERROR] --gtid-mode=ON or UPGRADE_STEP_1 or UPGRADE_STEP_2 requires --log-bin and --log-slave-updates
2015-10-09 22:17:10 235 [ERROR] Aborting

Here is the conf file I used:

[mysqld]
server_id    = 1
port         = 3307
report_host  = 172.17.42.1
report_port  = 3307
general_log      = ON
general_log_file = /var/log/mysql/queries.log
log_bin          = /var/log/mysql/mysql-bin.log
# used /var/log/mysql so that I didn't have to mkdir or chown
binlog_do_db     = chaostesting
log_slave_updates = TRUE
master_info_repository   = TABLE
gtid_mode                = ON
enforce_gtid_consistency = ON

And my docker run:

$ docker run -it --rm --name mysql \
  -v "$PWD"/master.cnf:/etc/mysql/conf.d/master.cnf:ro \
  -e MYSQL_ROOT_PASSWORD=rootpassword \
  -m 2g -e MYSQL_DATABASE=example \
  -p 3307:3307 \
  mysql