Starting MGR
Log in to the three MySQL databases and start MGR.
- Start the primary database of the MGR (3306 is used as the primary database in this document).
- Log in to the MySQL database.
/usr/local/mysql/bin/mysql -uroot -p123456 -S /data/mysql/run/mysqlm.sock
- Set the permissions so that you can create an InnoDB cluster in the existing MGR by using MySQL Shell.
GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION; flush privileges;
- Start MGR.
SET GLOBAL group_replication_bootstrap_group=ON; START GROUP_REPLICATION; SET GLOBAL group_replication_bootstrap_group=OFF;
For MySQL 8.0.21 and later versions, replace START GROUP_REPLICATION; in the preceding command with START GROUP_REPLICATION USER='rpl_user', PASSWORD='123456';.
- Log in to the MySQL database.
- Start the secondary databases of MGR. (3307 and 3308 are used as secondary databases in this document)
- Log in to the MySQL databases.
1 2
/usr/local/mysql/bin/mysql -uroot -p123456 -S /data/mysql/run/mysqls.sock /usr/local/mysql/bin/mysql -uroot -p123456 -S /data/mysql/run/mysqls2.sock
- Run the following statement in the secondary databases of ports 3307 and 3308 to start MGR:
START GROUP_REPLICATION;
- View the information about group members. You can view any member in the MGR group.
SELECT * FROM performance_schema.replication_group_members;

- Log in to the MySQL databases.
Parent topic: Deploying MGR (Single-Primary Mode)