Coordinator nodes in the China-domestically developed GBase 8a MPP database from GBASE are peers: they hold identical metadata, including database accounts and passwords, so a client can connect through any one of them. When a particular node must stop serving external access, the trick is to change the password stored locally on that node. New connections then fail to authenticate, while existing sessions stay alive (kill them manually if needed). The change is local to one gbase coordinator and never propagates to the other management nodes.

One warning before you start: do not apply this to the built-in DBA accounts such as root or gbase, and avoid using DBA accounts for application traffic in the first place. If every account on the node is locked out, the only way back is a service restart.

How to apply it

Log in as a DBA user and restrict only non-DBA accounts.

1. Save the current password

If you have forgotten it, query another gcluster node, or generate restore statements for all users at once (flush privileges refreshes automatically):

select password from gbase.user where user='testdb'; select concat('update gbase.user set password=\'',password,'\' where user=\'',user,'\';') sq from gbase.user; select 'flush privileges; 

2. Change the local password

Passwords are stored as SHA-256 hashes, so writing any arbitrary value guarantees the original password no longer matches:

update gbase.user set password='XXXX' where user='testdb'; 

You can also let password() compute the hash, or paste a known hash directly:

update gbase.user set password=password('123') where user='testdb'; update gbase.user set password='*23AE809DDACAF96AF0FD78ED04B6A265E05AA257' where user='testdb'; 

Repeat for each account you want to restrict. To lock every account on that node at once:

update gbase.user set password=password('NEWPASSOWRD'); flush privileges; 

3. Refresh privileges

No restart is required:

flush privileges; 

4. Verify the effect

On the modified node (10.0.2.201) the login is rejected, while 10.0.2.202 still accepts the original password:

[gbase@localhost ~]$ gcadmin CLUSTER STATE: ACTIVE CLUSTER MODE: NORMAL ================================================================= | GBASE COORDINATOR CLUSTER INFORMATION | ================================================================= | NodeName | IpAddress |gcware |gcluster |DataState | ----------------------------------------------------------------- | coordinator1 | 10.0.2.201 | OPEN | OPEN | 0 | ----------------------------------------------------------------- | coordinator2 | 10.0.2.202 | OPEN | OPEN | 0 | ----------------------------------------------------------------- | coordinator3 | 10.0.2.203 | OPEN | OPEN | 0 | ----------------------------------------------------------------- ============================================================= | GBASE DATA CLUSTER INFORMATION | ============================================================= |NodeName | IpAddress |gnode |syncserver |DataState | ------------------------------------------------------------- | node1 | 10.0.2.201 | OPEN | OPEN | 0 | ------------------------------------------------------------- | node2 | 10.0.2.202 | OPEN | OPEN | 0 | ------------------------------------------------------------- | node3 | 10.0.2.203 | OPEN | OPEN | 0 | ------------------------------------------------------------- [gbase@localhost ~]$ gccli -utestdb -p1234 -h10.0.2.202 GBase client 8.6.2.43-R35.5_patch.817abae0. Copyright (c) 2004-2024, GBase. All Rights Reserved. gbase> ^CAborted [gbase@localhost ~]$ gccli -utestdb -p1234 -h10.0.2.201 ERROR 1045 (28000): Access denied for user 'testdb'@'10.0.2.201' (using password: YES) [gbase@localhost ~]$ gccli 

With a connection pool configured for failover and multiple IPs, a failed node is skipped automatically. The client tries 201, gets ERROR 1045, moves on to 202, and the query succeeds — the original password is 1234 and 201 was changed to 123:

[gbase@localhost ~]$ gccli -h10.0.2.201,10.0.2.202,10.0.2.203 -utestdb -p1234 -e"select now()" ERROR 1045 (28000): Access denied for user 'testdb'@'10.0.2.201' (using password: YES) +---------------------+ | now() | +---------------------+ | 2024-05-15 09:13:53 | +---------------------+ [gbase@localhost ~]$ 

Recovery

Put the original hash back and refresh:

update gbase.user set password='XXXXXXXXX' where user='testdb'; flush privileges; 

When every account is locked out

Copy the user table from another gcluster node, then restart the gcluster service on the affected node:

scp 10.0.2.202:/opt/gcluster/userdata/gcluster/gbase/user.* /opt/gcluster/userdata/gcluster/gbase/ gcluster_services gcluster restart 

Going forward, treat this as a targeted, per-node access control rather than a password change: keep a saved copy of the original hashes, verify failover behaviour before rolling it out, and never point it at the DBA accounts a gbase cluster needs for its own recovery.