External client connection PostgreSQL related settings

Source: Internet
Author: User

To modify the listening parameters in the service configuration file postgresql.conf

The default profile is in the Pgdata directory (except that you specify it through the parameter Config_file in the service process)

[[email protected] data]$ vi postgresql.conf ......listen_addresses = ‘*‘                  # what IP address(es) to listen on;......
Modify the pg_hba.conf file to add a row of host authentication

The default profile is in the Pgdata directory and can be modified to another location through the Hba_file parameter in the service configuration file postgresql.conf

[[email protected] data]$ vi pg_hba.conf ......host    all             all             192.168.10.0/24         md5......

192.168.10.0/24 is the network segment where my client is located

Reboot takes effect.
[[email protected] data]$ pg_ctl restart -l /var/lib/pgsql/pgsql.log waiting for server to shut down...LOG:  received smart shutdown request.LOG:  autovacuum launcher shutting down.................................LOG:  shutting downLOG:  database system is shut down doneserver stoppedserver starting
Create a new user

psql default is postgres Super User

[[email protected] data]$ psqlpsql (9.4.0)Type "help" for help.postgres=# create user hippo password ‘hippo‘;CREATE ROLEpostgres-# \q
Test connection

External client connection PostgreSQL related settings

Related Article

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.