The first step is to deploy three instances of MySQL Server.
Group Replication is a built-in MySQL plugin provided with MySQL
Server 5.7.17 and later. For more background information on
MySQL plugins, see Section 5.5, “MySQL Server Plugins”. This
procedure assumes that MySQL Server was downloaded and unpacked
into the directory named mysql-5.7. The
following procedure uses one physical machine, therefore each
MySQL server instance requires a specific data directory for the
instance. Create the data directories in a directory named
data and initialize each one.
mkdir data
mysql-5.7/bin/mysqld --initialize-insecure --basedir=$PWD/mysql-5.7 --datadir=$PWD/data/s1
mysql-5.7/bin/mysqld --initialize-insecure --basedir=$PWD/mysql-5.7 --datadir=$PWD/data/s2
mysql-5.7/bin/mysqld --initialize-insecure --basedir=$PWD/mysql-5.7 --datadir=$PWD/data/s3
Inside data/s1, data/s2,
data/s3 is an initialized data directory,
containing the mysql system database and related tables and much
more. To learn more about the initialization procedure, see
Section 2.10.1.1, “Initializing the Data Directory Manually Using mysqld”.
Do not use --initialize-insecure in
production environments, it is only used here to simplify the
tutorial. For more information on security settings, see
Section 17.5, “Group Replication Security”.