opengauss 远程连接 或navicat 等客户端

    A  官网的postgresql.jar (只可代码连接)

opengauss 远程连接 或navicat 等客户端

则需要 设置为 sha256加密方式

    gs_guc set -N all -I all -h "host all replication 0.0.0.0/0 sha256"
    gs_guc set -N all -I all -h "host all all 0.0.0.0/0 sha256"

 opengauss (官网给的) :
         authmehod-options支持以下选项:
         - trust:不验密,禁止远程主机使用trust方式访问openGauss
         - reject:拒绝访问
         - md5:md5认证,默认不支持
         - sha256:sha256认证(推荐使用)
         - cert:客户端证书认证
         - gss:kerberos认证

B   开源postgresql.jar(可以开源客户端或代码)

1 要兼容使用psql 可以修改为md5,对应password_encryption_type参数

    #password_encryption_type = 2        #Password storage type, 0 is md5 for PG, 1 is sha256 + md5, 2 is sha256 only

     修改方式(两种)

     a   使用 gs_guc 命令

     b   vi /opt/huawei/install/data/db1/postgresql.conf (主备都要修改)

     设置  password_encryption_type=0

              可以使用 show password_encryption_type  命令查看

 2  设置 为 MD5 加密方式

    gs_guc set -N all -I all -h "host all replication 0.0.0.0/0 md5"
    gs_guc set -N all -I all -h "host all all 0.0.0.0/0 md5"

3  需要重新启动 opengauss 

 ga_om -t stop

 gs_om -t start

4  在主节点  重新修改 密码

  gsql -d postgres -p 26000

   ALTER USER joe PASSWORD '[email protected]'

5 重新连接 即可成功