第二节点创建用户时提示只读,在安装文档中提到“重启GreatSQL实例后(report-host 是只读选项,需要重启才能生效),创建MGR服务专用账号及配置MGR服务通道:” ,重启该怎么操作? mysql> select * from performance_schema.replication_group_members; +---------------------------+--------------------------------------+---------------+-------------+--------------+-------------+----------------+----------------------------+ | CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION | MEMBER_COMMUNICATION_STACK | +---------------------------+--------------------------------------+---------------+-------------+--------------+-------------+----------------+----------------------------+ | group_replication_applier | 960fbf06-ce2e-11ee-84b4-000c29759f14 | 192.168.2.182 | 3306 | ERROR | | 8.0.32 | XCom | | group_replication_applier | 9ff7b4bd-ce2e-11ee-b76e-000c29721c48 | 192.168.2.181 | 3306 | ONLINE | PRIMARY | 8.0.32 | XCom | +---------------------------+--------------------------------------+---------------+-------------+--------------+-------------+----------------+----------------------------+ 2 rows in set (0.00 sec) mysql> set session sql_log_bin=0; Query OK, 0 rows affected (0.00 sec) mysql> create user repl@'%' identified with mysql_native_password by 'repl'; ERROR 1290 (HY000): The MySQL server is running with the --super-read-only option so it cannot execute this statement mysql> select * from performance_schema.replication_group_members; +---------------------------+--------------------------------------+---------------+-------------+--------------+-------------+----------------+----------------------------+ | CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION | MEMBER_COMMUNICATION_STACK | +---------------------------+--------------------------------------+---------------+-------------+--------------+-------------+----------------+----------------------------+ | group_replication_applier | 960fbf06-ce2e-11ee-84b4-000c29759f14 | 192.168.2.182 | 3306 | ERROR | | 8.0.32 | XCom | +---------------------------+--------------------------------------+---------------+-------------+--------------+-------------+----------------+----------------------------+ 1 row in set (0.00 sec) 另外第二个节点还需要设置如下两条吗? SET GLOBAL group_replication_group_seeds= "192.168.2.181:33061,192.168.2.182:33061,192.168.2.183:33061"; SET GLOBAL group_replication_group_name="aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa1"; my.cnf 配置如下: [root@sql02 ~]# cat /etc/my.cnf [mysqld] user = mysql basedir=/usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64 datadir=/data/GreatSQL port=3306 server_id=33062 log-bin log_slave_updates=1 gtid_mode=ON enforce_gtid_consistency=ON log_error = /data/GreatSQL/error.log plugin_load_add='group_replication.so' group_replication_group_name="aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa1" group_replication_local_address= "192.168.2.182:33061" group_replication_group_seeds= "192.168.2.181:33061,192.168.2.182:33061,192.168.2.183:33061" report-host=192.168.2.182 |
yejr
2024-2-28 09:12:43
| ||
合作电话:010-64087828
社区邮箱:greatsql@greatdb.com