PostgreSQL pg_hba.conf

Source: Internet
Author: User
Tags md5

Pg_hba.conf is a client authentication configuration file

METHOD specifies how the client's authentication is handled. Commonly used are ident,md5,password,trust,reject.

PostgreSQL only listens to local ports by default, and Netstat-tuln only sees "TCP 127.0.0.1:5432 LISTEN".

Modify the listen_address=* in the postgresql.conf to listen on all ports so that the remote can log on to the database via TCP/IP, NETSTAT-TULN will see "TCP 0.0.0.0:5432 LISTEN ”。

1, allow local use PGAdmin3 login database, database address localhost, user user1, database user1db:

host    user1db    user1    127.0.0.1/32    md5

2, allow 10.1.1.0~10.1.1.255 network segment login database:

host    all    all    10.1.1.0/24    md5

3. Trust 192.168.1.10 Login Database:

host    all    all    192.168.1.10/32    trust

PostgreSQL pg_hba.conf

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.