Skip to content

Commit 4ed75c5

Browse files
committed
fix: ProxySQL GR monitor sees all nodes as offline (hostgroup 3)
rsandbox user lacked SELECT on performance_schema, so ProxySQL's group_replication monitor couldn't query replication_group_members to determine writer/reader roles. All servers ended up in the offline hostgroup (3), causing "Max connect timeout" on writes. Grant performance_schema access to the replication monitor user after cluster creation.
1 parent 417b262 commit 4ed75c5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sandbox/templates/cluster/init_cluster.gotxt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ cluster.addInstance('icadmin:icadmin@127.0.0.1:{{.Port}}', {recoveryMethod: 'inc
4040
sleep 3
4141
{{end}}
4242

43+
# Grant performance_schema access to the replication/monitor user
44+
# ProxySQL's GR monitor needs this to query replication_group_members
45+
$MYSQL -u root -p{{.DbPassword}} -h 127.0.0.1 -P {{.PrimaryPort}} -e "GRANT SELECT ON performance_schema.* TO '{{.RplUser}}'@'127.%';" 2>/dev/null
46+
4347
echo "Checking cluster status..."
4448
$MYSQLSH --uri icadmin:icadmin@127.0.0.1:{{.PrimaryPort}} --js -e "
4549
var cluster = dba.getCluster();

0 commit comments

Comments
 (0)