zoukankan      html  css  js  c++  java
  • postgresql pg_hba.conf

    pg_hba.conf是客户端认证配置文件

    METHOD指定如何处理客户端的认证。常用的有ident,md5,password,trust,reject。

    PostgreSQL默认只监听本地端口,用netstat -tuln只会看到“tcp 127.0.0.1:5432 LISTEN”。

    修改postgresql.conf中的listen_address=*,监听所有端口,这样远程才能通过TCP/IP登录数据库,用 netstat -tuln会看到“tcp 0.0.0.0:5432 LISTEN”。

    1、允许本地使用PGAdmin3登录数据库,数据库地址localhost,用户user1,数据库user1db:

     
    host    user1db    user1    127.0.0.1/32    md5

    2、允许10.1.1.0~10.1.1.255网段登录数据库:

     
    host    all    all    10.1.1.0/24    md5

    3、信任192.168.1.10登录数据库:

     
    host    all    all    192.168.1.10/32    trust
  • 相关阅读:
    A. Playing with Paper
    手摇算法
    perl之创建临时文件夹遇到同名文件该咋办
    B. Two Buttons
    A Pangram
    shell的面试题
    A. Game
    B. Drazil and His Happy Friends
    A. Drazil and Date
    2道阶乘的算法题
  • 原文地址:https://www.cnblogs.com/sheapchen/p/4176425.html
Copyright © 2011-2022 走看看