I think I may have confused you here.
We have 2 servers in cluster say host1(with Fully qualified domain name(FQDN)) and host2(with Fully qualified domain name(FQDN)).
Replication is happening fine between these hosts.
Now, I am getting below error in host1 in ssg logs:
2018-07-04T14:50:14.003+0100 WARNING 100 com.l7tech.server.cluster.DatabaseReplicationMonitor: 2380: Error accessing host/database host2/ssg: Could not get JDBC Connection; nested exception is java.sql.SQLException: Access denied for user 'gateway'@'host1' (using password: YES)
And getting below error in host2:
2018-07-04T06:36:54.262-0700 WARNING 101 com.l7tech.server.cluster.DatabaseReplicationMonitor: 2380: Error accessing host/database host1/ssg: Could not get JDBC Connection; nested exception is java.sql.SQLException: Access denied for user 'gateway'@'host2' (using password: YES)
I could see user gateway is present in "mysql" DB in "user" table on both the servers host1 and host2.
And for "gateway" user, below user-host combinations are present in the "user" table on host2:
host1 | gateway
host2 | gateway
<only host1(without FQDN)> | gateway
% | gateway
localhost | gateway
localhost6 | gateway
localhost.localdomain | gateway
localhost6.localdomain6 | gateway
And below are present in host1:
host1 | gateway
% | gateway
host2 | gateway
localhost | gateway
localhost6 | gateway
localhost.localdomain | gateway
localhost6.localdomain6 | gateway
Now, from the error, it is understood that host1 is not able to connect to host2/ssg DB and we are getting access denied for user "gateway" on its own host: host1.
I've tried to reset the password directly from Mysql for this user and via resetadmin script. But no luck. Getting error as mentioned in my earlier update.
When I am trying to reset it via SSGCONFIG shell(option 2 then option 8(Reset Admin password)) on host2, I am seeing below error while resetting any of the users like'gateway'@'host1', 'gateway'@'host2', 'gateway'@'localhost', etc passwords:
Unable to update admin account due to error 'Access denied for user 'gateway'@'host2' (using password: YES)'.
And getting below error on host1:
The administrative username, 'gateway'@'host1', does not exist.
The administrative username, 'gateway'@'host2', does not exist.
Hope this makes sense now.
Can you help me to resolve this error?
Let me know for any further queries.
Thanks,
Nikunj