Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # The MySQL database server configuration file.
- #
- # You can copy this to one of:
- # - "/etc/mysql/my.cnf" to set global options,
- # - "~/.my.cnf" to set user-specific options.
- #
- # One can use all long options that the program supports.
- # Run program with --help to get a list of available options and with
- # --print-defaults to see which it would actually understand and use.
- #
- # For explanations see
- # http://dev.mysql.com/doc/mysql/en/server-system-variables.html
- #
- # * IMPORTANT: Additional settings that can override those from this file!
- # The files must end with '.cnf', otherwise they'll be ignored.
- #
- !includedir /etc/mysql/conf.d/
- !includedir /etc/mysql/mysql.conf.d/
- # my.cnf from DigitalOcean help PDF.
- ## going for: multi-primary replication group
- ## sudo vi /etc/mysql/my.cnf
- ## By default, this file is only used to source additional files from subdirectories. We will have to add
- ## our own configuration beneath the !includedir lines. This allows us to easily override any
- ## settings from the included files.
- ## settings here overide the include files
- ## The loose- prefix allows MySQL to gracefully handle options it does not recognize gracefully without failure.
- [mysqld]
- # General replication settings
- gtid_mode = ON
- enforce_gtid_consistency = ON
- master_info_repository = TABLE
- relay_log_info_repository = TABLE
- binlog_checksum = NONE
- log_slave_updates = ON
- log_bin = binlog
- binlog_format = ROW
- transaction_write_set_extraction = XXHASH64
- loose-group_replication_bootstrap_group = OFF
- loose-group_replication_start_on_boot = OFF
- loose-group_replication_ssl_mode = REQUIRED
- loose-group_replication_recovery_use_ssl = 1
- # Shared replication group configuration
- ## This section should be the same on each of your MySQL servers...
- ## uuidgen
- loose-group_replication_group_name = "de991111-f29d-46fa-8054-7529a19eada6"
- loose-group_replication_ip_whitelist = "192.168.2.0/24, 10.10.10.0/24"
- loose-group_replication_group_seeds = "192.168.2.220:33061, 192.168.2.221:33061, 192.168.2.222:33061, 192.168.2.223:33061, 192.168.2.10:33061, 192.168.2.11:33061"
- # Single or Multi-primary mode? Uncomment these two lines
- # for multi-primary mode, where any host can accept writes
- # comment out for single primary mode
- ## These settings must be the same on each of your MySQL servers ...
- ## A multi-primary group allows writes to any of the group members.
- loose-group_replication_single_primary_mode = OFF
- loose-group_replication_enforce_update_everywhere_checks = ON
- # Host specific replication configuration
- ## settings that will be different on each of the servers...
- ### sql[0-9] -- 22[0-9]
- ### rep[0-20 -- 2[10-29]
- ### SQL0 ###
- server_id = 220
- bind-address = "192.168.2.220"
- report_host = "192.168.2.220"
- loose-group_replication_local_address = "192.168.2.220:33061"
- ## fix warnings
- relay-log=sql0-relay-bin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement