Greenplum中客户端接口和程序

客户端接口和程序

配置客户端认证

允许连接到GPDB,在Master节点上编辑pg_hba.conf 文件

1)        依次查看Master节点和Slave节点中该文件:

[gpadmin@master gpseg-1]$ pwd

/data/master/gpseg-1

[gpadmin@master gpseg-1]$ cat pg_hba.conf

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only

# IPv4 local connections:

# IPv6 local connections:

local    all         gpadmin         ident

host     all         gpadmin         127.0.0.1/28    trust

host     all         gpadmin         192.168.80.200/24       trust

host     all         gpadmin         ::1/128       trust

host     all         gpadmin         fe80::20c:29ff:fe9d:3bd6/128       trust

[gpadmin@slave1 gpseg0]$ pwd

/data/primary/gpseg0

[gpadmin@slave1 gpseg0]$ cat pg_hba.conf

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only

local   all         all                               trust

# IPv4 local connections:

host    all         all         127.0.0.1/24          trust

# IPv6 local connections:

host    all         all         ::1/128               trust

host all all ::1/128 trust

host all all 192.168.80.200/32 trust

host all all fe80::20c:29ff:fe9d:3bd6/128 trust

host all gpadmin 192.168.80.201/32 trust

host all gpadmin ::1/128 trust

host all gpadmin fe80::250:56ff:fe24:a00/128 trust

2)        编辑文件,示例文件如下所示:

# allow the gpadmin user local access to all databases     允许gpadmin用户连接本机所有数据库

# using ident authentication                      

local all gpadmin ident sameuser                    

host all gpadmin 127.0.0.1/32 ident

host all gpadmin ::1/128 ident

host all dba 192.168.0.0/32 md5

host all all 192.168.0.0/32

ldap ldapserver=usldap1     

ldapport=1389 ldapprefix="cn="                   

ldapsuffix=",ou=People,dc=company,dc=com”

3)        保存并关闭文件

4)        重新加载pg_hba.conf使修改生效

-u (reload pg_hba.conf and postgresql.conf files only)

 

 This option reloads the pg_hba.conf files of the master and

 segments and the runtime parameters of the postgresql.conf files

 but does not shutdown the Greenplum Database array. Use this

 option to make new configuration settings active after editing

 postgresql.conf or pg_hba.conf. Note that this only applies to

 configuration parameters that are designated as runtime parameters.

[gpadmin@master gpseg-1]$ gpstop -u

20150324:22:44:04:008787 gpstop:master:gpadmin-[INFO]:-Starting gpstop with args: -u

20150324:22:44:04:008787 gpstop:master:gpadmin-[INFO]:-Gathering information and validating the environment...

20150324:22:44:04:008787 gpstop:master:gpadmin-[INFO

  • 7
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值