1、配置簡單的口令訪問數據庫
1,創建數據庫和用戶ide
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,添加一個口令訪問用戶post
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,重載配置文件使之生效ui
hawq stop cluster -u -a -M fast
注意這個命令並不是中止集羣,只是爲了從新裝載配置。spa