Greenplum 5.7 + Connection Master segment

Source: Internet
Author: User
Tags md5 psql

Os:centos 7.4
gp:gpdb-5.7.0

Three machines
Node1 is master host
Node2, Node3 for segment host psql login Master

Operation on Node1

# su-gpadmin
$ psql-d peiybdb
psql (8.3.23)
Type ' help ' for help.

peiybdb=# \l
                  List of Databases
   Name    |  Owner  | Encoding |  Access privileges  
-----------+---------+----------+---------------------
 peiybdb   | gpadmin | UTF8     | 
 Postgres  | gpadmin | UTF8     | 
 Template0 | Gpadmin | UTF8     | =c/gpadmin          
                                : gpadmin=ctc/gpadmin
 template1 | gpadmin | UTF8     | =c/gpadmin          
                                : gpadmin=ctc/gpadmin
(4 rows)
peiybdb=# \c
You are now connected to Database "PEIYBDB" as User "Gpadmin".
peiybdb=# Select Now ();
             Now              
------------------------------
 2018-05-02 06:55:25.99893+00
(1 row)

Node1 operation, modify pg_hba.conf

$ cd/u01/greenplum-data/gpseg-1/
$ VI pg_hba.conf
host     all         gpadmin         192.168.56.1/32     MD5
host     all         gpadmin         192.168.165.1/32    MD5
$ psql-d peiybdb psql
(8.3.23)
Type " Help.

peiybdb=# 
peiybdb=# Select pg_reload_conf ();
 pg_reload_conf 
----------------
 t
(1 row)
Psql Login Segment

Node2 or Node3 operation.

# su-gpadmin
$ pgoptions= '-c gp_session_role=utility ' psql-p 40000-d peiybdb
(psql)
Type "Help" For help.

peiybdb=# 
peiybdb=# Select Now ();
              Now              
-------------------------------
 2018-05-02 13:01:55.307143+00
(1 row)

peiybdb=# Select Current_database ();
 Current_database 
------------------
 peiybdb
(1 row)


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.