HAWQ配置之客户端访问

一、配置简单的口令访问

1,建立数据库和用户

postgres=# create database epbd;
CREATE DATABASE
postgres=# create role user1 with login;
NOTICE:  resource queue required -- using default resource queue "pg_default"
CREATE ROLE
postgres=# alter role user1 with password 'user1';
ALTER ROLE
postgres=# grant all on epbd to user1;
ERROR:  relation "epbd" does not exist
postgres=# grant all on database epbd to user1;
GRANT

 

2,修改master访问配置文件pg_hba.conf,添加一个口令访问用户

local    all         gpadmin         ident
host     all         gpadmin         127.0.0.1/28    trust
host  all     gpadmin    ::1/128       trust
host  all     gpadmin    192.168.58.15/32       trust
host  all     gpadmin    fe80::4ecc:6aff:fe93:3250/128       trust
host  all     gpadmin    192.168.58.11/32       trust
local all yh password host all user1
192.168.0.0/16 password

 

3,重载配置文件使之生效

 hawq stop cluster -u -a -M fast

注意这个命令并非停止集群,只是为了重新装载配置。

 

    原文作者:佣工7001
    原文地址: https://www.cnblogs.com/dajianshi/p/9843407.html
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞