Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
If anybody wants to appreciate the effort involved in writing the tutorial to the bare bone implementation level (or if anyone wants to have the comprehensive picture of whole process) from the manual chapter from [mysql site] (https://dev.mysql.com/doc/refman/5.7/en/group-replication.html),
consider the ToC:
17.1 Group Replication Background
17.2 Getting Started
17.3 Monitoring Group Replication
17.4 Group Replication Operations
17.5 Group Replication Security
17.6 Group Replication System Variables
17.7 Requirements and Limitations
17.8 Frequently Asked Questions
17.9 Group Replication Technical Details
The chapter is structured as follows:
Section 17.1, “Group Replication Background” provides an introduction to groups and how Group Replication works.
Section 17.2, “Getting Started” explains how to configure multiple MySQL Server instances to create a group.
Section 17.3, “Monitoring Group Replication” explains how to monitor a group.
Section 17.5, “Group Replication Security” explains how to secure a group.
Section 17.9, “Group Replication Technical Details” provides in-depth information about how Group Replication works.
And for the production use (beyond learning), one should also follow https://dev.mysql.com/doc/refman/5.7/en/group-replication-security.html.
Full form of UUID: The uuidgen program creates a new universally unique identifier (UUID) using the libuuid(3) library. The new UUID can reasonably be consid- ered unique among all UUIDs created on the local system, and among UUIDs created on other systems in the past and in the future. from: http://linuxcommand.org/man_pages/uuidgen1.html
What does this give you that something like Percona Cluster or Mariadb/Galera doesn’t ? What is the benefit ?
At the time I enter on mysql shell: INSTALL PLUGIN group_replication SONAME ‘group_replication.so’;
the shell returns: ERROR 1126 (HY000): Can’t open shared library ‘/usr/lib/mysql/plugin/group_replication.so’ (errno: 2 /usr/lib/mysql/plugin/group_replication.so: cannot open shared object file: No such file or directory)
and in fact inside there is no group_replication.so: ls /usr/lib/mysql/plugin/
adt_null.so connection_control.so keyring_file.so locking_service.so mysql_no_login.so semisync_master.so validate_password.so auth_socket.so innodb_engine.so libmemcached.so mypluglib.so rewriter.so semisync_slave.so version_token.so
Currently mysql-server is in 5.7.20 version. What can I do?
On other forums only say that it must have the group_replication.so module, but digitalOcean repositories does not have it. Do I need to install it externally or an older version?
Hi! This document is incredibly helpful and useful, and I’ve been trying to follow it to a T.
However, I’m hitting a roadblock though where I’m unable to get group replication going with 2 and 3 (the ones where you just do “START REPLICATION;”)
The error I’m getting is: 2017-11-21T23:09:08.031341Z 0 [ERROR] Plugin group_replication reported: ‘[GCS] Error connecting to all peers. Member join failed. Local port: 33061’
Any suggestions on how to diagnose? The config files should be good-- using the same uuid, the IPs and ports are the ones that come out of $mysql -u root -p -e “SHOW VARIABLES WHERE Variablename = ‘hostname’” and $mysql -u root -p -e “SHOW VARIABLES WHERE Variablename = ‘port’”
I’ve redacted some info from below, but here is the customized half of the cnf file from 2 (please forgive formatting, I tried to put it in code formatting and then my comment got flagged…)
loose-groupreplicationgroupname = “[UUID]” loose-groupreplicationipwhitelist = “[ip 1],[ip2],[ip3]” loose-groupreplicationgroup_seeds = "[ip 1]:33061,[ip2]:33061,[ip3]:33061”
Single or Multi-primary mode? Uncomment these two lines for multi-primary mode, where any host can accept writes loose-groupreplicationsingleprimarymode = OFF loose-groupreplicationenforceupdateeverywhere_checks = ON
Host specific replication configuration serverid = 2 bind-address = “[ip2]” reporthost = “[ip2]” loose-groupreplicationlocal_address = “[ip2]:33061”
Thanks in advance.
Great tutorial! Worked perfectly, and I had a three multi-master setup going in a couple of hours.
A couple of related questions:
I realize these are similar questions, but the first scenario, where two die, may mean you can’t add without taking down the one remaining production server and doing a backup. In the scenario where I want to add two more to a healthy setup of three, it might be an option to take out one, dump the databases, and add it back, and then configure the next two by loading the dump, etc. But I’d like to know how to do this in both situations.
Also possibly related to the above: after having gone into production, I realized that I need to increase innodb-page-size to 64k to accommodate larger row sizes, but I can’t just change that in my.cnf and restart MySQL, because I’ll see something like: “InnoDB: Data file ‘./ibdata1’ uses page size 16384, but the innodb-page-size start-up parameter is 65536”. So if I can rebuild one of the masters with the new parameter and have it sync up, I could then make it primary, and rebuild the rest one at a time. I think I’m being a little naive and hopeful here; I doubt it’s that simple. I’d love some input on this.
Hi everyone… I`ve been on this for a week already, so i am a bit desperate for some help…
I have followed every step in this tutorial to the letter, but when i try to start_replication on server 2 or 3, they don`t join the group, but instead become masters of their own!..
Please advice if you can see something obviously wrong in my cnf files or how to debug it further…
Ports 3306 and 33061 are open on all 3 servers.
“repl” users created on each server as per tutorial.
==== my.cnf | server 1 ===
[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
loose-group_replication_group_name = "b0608af9-7369-4442-8040-d3090eda3216"
loose-group_replication_ip_whitelist = "165.227.202.134,165.227.194.142,192.241.157.4"
loose-group_replication_group_seeds = "165.227.202.134:33061,165.227.194.142:33061,192.241.157.4:33061"
# Single or Multi-primary mode? Uncomment these two lines
# for multi-primary mode, where any host can accept writes
#loose-group_replication_single_primary_mode = OFF
#loose-group_replication_enforce_update_everywhere_checks = ON
# Host specific replication configuration
server_id = 1
bind-address = "165.227.202.134"
report_host = "165.227.202.134"
loose-group_replication_local_address = "165.227.202.134:33061"
==== my.cnf | server 2 ===
[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
loose-group_replication_group_name = "b0608af9-7369-4442-8040-d3090eda3216"
loose-group_replication_ip_whitelist = "165.227.202.134,165.227.194.142,192.241.157.4"
loose-group_replication_group_seeds = "165.227.202.134:33061,165.227.194.142:33061,192.241.157.4:33061"
# Single or Multi-primary mode? Uncomment these two lines
# for multi-primary mode, where any host can accept writes
#loose-group_replication_single_primary_mode = OFF
#loose-group_replication_enforce_update_everywhere_checks = ON
# Host specific replication configuration
server_id = 2
bind-address = "165.227.194.142"
report_host = "165.227.194.142"
loose-group_replication_local_address = "165.227.194.142:33061"
==== my.cnf | server 3 ===
[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
loose-group_replication_group_name = "b0608af9-7369-4442-8040-d3090eda3216"
loose-group_replication_ip_whitelist = "165.227.202.134,165.227.194.142,192.241.157.4"
loose-group_replication_group_seeds = "165.227.202.134:33061,165.227.194.142:33061,192.241.157.4:33061"
# Single or Multi-primary mode? Uncomment these two lines
# for multi-primary mode, where any host can accept writes
#loose-group_replication_single_primary_mode = OFF
#loose-group_replication_enforce_update_everywhere_checks = ON
# Host specific replication configuration
server_id = 3
bind-address = "192.241.157.4"
report_host = "192.241.157.4"
loose-group_replication_local_address = "192.241.157.4:33061"
This may have changed since this was first posted, but I’m getting this error: mysql> INSTALL PLUGIN group_replication SONAME ‘group_replication.so’; ERROR 1126 (HY000): Can’t open shared library ‘/usr/lib/mysql/plugin/group_replication.so’ (errno: 2 /usr/lib/mysql/plugin/group_replication.so: cannot open shared object file: No such file or directory)
I researched, and what I found is saying that replication only works in Community, and not Enterprise. Seems that even with the repo change, Ubuntu installs Enterprise by default. Is this really new? Is there a way around this? Can I download group_replication.so from somewhere?
EDIT: I managed to determine that is WAS Community that was installed. So, now I’m left wondering why that plugin is unavailable?
FURTHER EDIT: when in doubt, uninstall everything and re-install. Did that to each mysql component, did apt-get update again and installed and now it works. Go figure.
0 down vote favorite
i am trying to make mysql group replication or cluster on 3 ubuntu machines 2 masters and one slave the base tutorial is mysql replication
but i cant do the right configuration so please help me my /etc/mysql/my.cnf file is like this
[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 = ON
loose-group_replication_ssl_mode = REQUIRED
loose-group_replication_recovery_use_ssl = 1
# Shared replication group configuration
loose-group_replication_group_name = "1a0eadf1-52c7-4f3c-b7d8-f432047f4482"
loose-group_replication_ip_whitelist = "192.168.23.244,192.168.23.243,192.168.23.129 "
loose-group_replication_group_seeds = "192.168.23.244:33061,192.168.23.243:33061,192.168.23.129:33061"
# Single or Multi-primary mode? Uncomment these two lines
# for multi-primary mode, where any host can accept writes
loose-group_replication_single_primary_mode = OFF
loose-group_replication_enforce_update_everywhere_checks = ON
# Host specific replication configuration
server_id = 1
bind-address = "192.168.23.244"
report_host = "193.168.23.244"
loose-group_replication_local_address = "192.168.23.244:33061"
my masters are : 192.168.23.244 , 192.168.23.243 my slave is : 192.168.23.129