PostgreSQL connection Problem Fatal:no pg_hba.conf entry for host

Source: Internet
Author: User
Tags postgresql

The server doesn ' t grant access to the Database:the server reports
Fatal:no pg_hba.conf entry for host ' 192.168.0.123 ', user ' postgres ', database ' Postgres ' fatal:no pg_hba.conf entry for Host "192.168.0.123", User "Postgres", Database "Postgres"

PostgreSQL database for security, it does not listen for all connection requests except local, and when the user accesses through JDBC, it will report some of the following exceptions:

Org.PostgreSQL. Util. Psqlexception:fatal: no pg_hba. Conf entry for host

To solve this problem, you only need to find/data/Pg_hba in the installation directory of the PostgreSQL database. conf, find "# IPV4 local connections:"

The machine IP under which the request connection is added

Host All 127.0.0.1/32 MD5

32 is the network segment of the subnet mask; MD5 is a password authentication method that can be changed to trust

PostgreSQL connection Problem Fatal:no pg_hba.conf entry for host

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.