# Hostgroup id different on mysql\_servers and runtime\_mysql\_servers

**URL:** <https://forums.percona.com/t/hostgroup-id-different-on-mysql-servers-and-runtime-mysql-servers/8226>\
**Category:** ProxySQL\
**Tags:** community, mysql\
**Created:** [November 3, 2020, 12:08pm UTC](https://forums.percona.com/t/hostgroup-id-different-on-mysql-servers-and-runtime-mysql-servers/8226 "2020-11-03T12:08:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhi\_rathod](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/abhi_rathod/32/168_2.png) [@abhi\_rathod](https://forums.percona.com/u/abhi_rathod)\
**Post date:** [November 3, 2020, 12:08pm UTC](https://forums.percona.com/t/hostgroup-id-different-on-mysql-servers-and-runtime-mysql-servers/8226/1 "2020-11-03T12:08:20Z")

</div>

Hello,

I am exploring ProxySQL and I’ve installed it on Centos 7, My ProxySQL version is 2.0.6-73-gc746bf7.

I’ve mysql galera setup already there in 3 different VMs. [192.168.43.50, 192.168.43.51, 192.168.43.52]

I’ve installed ProxySQL on 192.168.43.50 server, and i want to configure split read/write operation between these nodes. so I’ve added these two nodes [.50 & .52] to the hostgroup ID - 3 [reader\_hostgroup] & one node [51] to the hostgroup id -2 [writer\_hostgroup]

so i’ve added mysql server as below.

INSERT INTO mysql\_servers(hostgroup\_id,hostname,port) VALUES (3,‘192.168.43.50’,3306);

INSERT INTO mysql\_servers(hostgroup\_id,hostname,port) VALUES (2,‘192.168.43.51’,3306);

INSERT INTO mysql\_servers(hostgroup\_id,hostname,port) VALUES (3,‘192.168.43.52’,3306);

LOAD MYSQL SERVERS TO RUNTIME;

SAVE MYSQL SERVERS TO DISK;

after this whenver i am checking mysql server its showing different hostgroup id for .50 node. in the runtime its showing that .50’s hostgroup id is 0, but i’ve added that node under hostgeoup\_id 3.

ProxySQL\> SELECT hostgroup\_id,hostname,port,status,weight FROM mysql\_servers;

±-------------±--------------±-----±-------±-------+

| hostgroup\_id | hostname | port | status | weight |

±-------------±--------------±-----±-------±-------+

| 2 | 192.168.43.51 | 3306 | ONLINE | 1 |

| 3 | 192.168.43.52 | 3306 | ONLINE | 1 |

| 3 | 192.168.43.50 | 3306 | ONLINE | 1 |

±-------------±--------------±-----±-------±-------+

ProxySQL\> SELECT hostgroup\_id,hostname,port,status,weight FROM runtime\_mysql\_servers;

±-------------±--------------±-----±--------±-------+

| hostgroup\_id | hostname | port | status | weight |

±-------------±--------------±-----±--------±-------+

| 3 | 192.168.43.52 | 3306 | SHUNNED | 1 |

**| 0 | 192.168.43.50 | 3306 | ONLINE | 1 |**

| 2 | 192.168.43.51 | 3306 | SHUNNED | 1 |

±-------------±--------------±-----±--------±-------+

ProxySQL\> select \* from mysql\_galera\_hostgroups;

±-----------------±------------------------±-----------------±------------------±-------±------------±----------------------±----------------

--------±--------+

| writer\_hostgroup | backup\_writer\_hostgroup | reader\_hostgroup | offline\_hostgroup | active | max\_writers | writer\_is\_also\_reader | max\_transactions

\_behind | comment |

±-----------------±------------------------±-----------------±------------------±-------±------------±----------------------±----------------

--------±--------+

| 2 | 4 | 3 | 1 | 1 | 1 | 0 | 100

```
   | |

```

±-----------------±------------------------±-----------------±------------------±-------±------------±----------------------±----------------

--------±--------+

Could you please help me here, what’s wrong here ? or i missed something here ? please guide.

Advance Thanks for the help.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [November 9, 2020, 2:29pm UTC](https://forums.percona.com/t/hostgroup-id-different-on-mysql-servers-and-runtime-mysql-servers/8226/2 "2020-11-09T14:29:18Z")

</div>

Hi @abhi_rathod, it looks like proxysql is unable to connect to your PXC nodes. Did you properly configure the ‘monitor’ user within proxysql and on your PXC? Have you looked at proxysql’s error log in /var/lib/proxysql/ ?

Any errors here?

```auto
SELECT hostname, connect_error FROM mysql_server_connect_log ORDER BY time_start_us DESC

```
