Access to PostgreSQL in Windows under Ubuntu

Source: Internet
Author: User
Tags auth postgresql

Because of the project, some of the information in Ubuntu needs to be recorded in the PostgreSQL database in Windows, viewing the information on the web, and finally succeeding, specifically documenting the following, which requires the following steps:

(1) Locate the pg_hba.conf file in the PostgreSQL directory in Windows and make the changes.

Add a row to this file, with the following seven types of format references:
Local database user Auth-method [auth-option]host database user cidr-address Auth-method [auth-option]ho Stssl database user cidr-address Auth-method [auth-option]hostnossl database user cidr-address auth-method [au  Th-option]host database user ip-address ip-mask auth-method [auth-option]hostssl database user ip-address Ip-mask Auth-method [auth-option]hostnossl database user ip-address ip-mask Auth-method [auth-option] such as host all All 192.168.1.0/24 MD5, which allows all hosts on the network segment 192.168.1.0 to access the database using all legitimate database usernames and provides encrypted password Authentication (2) found in the Windows PostgreSQL directory postgresql.conf files, Modify the postgresql.conf file to modify the listening mode of the database server to listen for connection requests made by all hosts. Change the file listen_addresses= ' localhost ' to listen_addresses= ' * ' To do the above two steps, restart the database service, check whether it is able to access normally, if not, check the firewall settings. (3) On the Windows Firewall page, select Advanced settings on the left to add rules.

Access to PostgreSQL in Windows under Ubuntu

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.