primary节点正常启动,并引导集群启动,成功创建root@'%'和repl@'%'用户, secondary节点启动报很多的ERROR 1290 (HY000) at line 143263: The MySQL server is running with the --super-read-only option so it cannot execute this statement,没有创建或同步创建root@'%'和repl@'%'用户,只有无密码的root@localhost账户,查看集群是正常的。 primary节点启动参数: docker run -d \ -e MYSQL_ALLOW_EMPTY_PASSWORD=1 \ -e MYSQL_INIT_MGR=1 \ -e MYSQL_MGR_LOCAL=172.16.1.100:33061 \ -e MYSQL_MGR_SEEDS=172.16.1.100:33061,172.16.1.101:33061 \ -e TZ=Asia/Shanghai \ -e MYSQL_MGR_START_AS_PRIMARY=1 \ -e MYSQL_MGR_ARBITRATOR=0 \ -v /home/docker/greatsql/data:/data/GreatSQL \ -v /home/docker/greatsql/conf.d/custom100.cnf:/etc/my.cnf \ --hostname=node1 \ --name=greatsql_node1 \ --net=host \ --privileged \ greatsql/greatsql:8.0.32-25 secondary节点启动参数: docker run -d \ -e MYSQL_ALLOW_EMPTY_PASSWORD=0 \ -e MYSQL_ROOT_PASSWORD="root123" \ -e MYSQL_ROOT_HOST="%" \ -e MYSQL_INIT_MGR=1 \ -e MYSQL_MGR_LOCAL=172.16.1.101:33061 \ -e MYSQL_MGR_SEEDS=172.16.1.100:33061,172.16.1.101:33061 \ -e TZ=Asia/Shanghai \ -e MYSQL_MGR_START_AS_PRIMARY=0 \ -e MYSQL_MGR_ARBITRATOR=0 \ -v /home/docker/greatsql/data:/data/GreatSQL \ -v /home/docker/greatsql/conf.d/custom101.cnf:/etc/my.cnf \ --hostname=node2 \ --name=greatsql_node2 \ --net=host \ --privileged \ greatsql/greatsql:8.0.32-25 详细配置如下: |
reddey
2024-7-11 14:36:23
| |
一个学艺不精的国产数据库爱好者
|
|
yejr
2024-7-11 16:11:31
| ||
合作电话:010-64087828
社区邮箱:greatsql@greatdb.com