zoukankan      html  css  js  c++  java
  • PostgreSQL10配置远程连接

    PostgreSQL10配置远程连接

    psql --version

    centos7.3中

    1、开启相应的防火墙端口,允许端口5432

    2、访问权限配置/etc/postgresql/10/main/下的pg_hba.conf

     
     
    # TYPE  DATABASE        USER            ADDRESS                 METHOD
    
    # "local" is for Unix domain socket connections only
    local   all             all                                     peer
    # IPv4 local connections:
    host    all             all             127.0.0.1/32            ident
    # IPv6 local connections:
    host    all             all             ::1/128                 ident
    # Allow replication connections from localhost, by a user with the
    # replication privilege.
    #local   replication     all                                     peer
    #host    replication     all             127.0.0.1/32            ident
    #host    replication     all             ::1/128                 ident
    host    all             all             0.0.0.0/0               md5
    

    3、监听机器配置/etc/postgresql/10/main/下的postgresql.conf

     
    # - Connection Settings -
    
    listen_addresses = '*'      # what IP address(es) to listen on;
                        # comma-separated list of addresses;
                        # defaults to 'localhost'; use '*' for all
                        # (change requires restart)
    #port = 5432                # (change requires restart)
    

    centos6.8中

    上述文件在/var/lib/pgsql/10/data/路径下

  • 相关阅读:
    Beta冲刺<7/10>
    Beta冲刺<6/10>
    Beta冲刺<5/10>
    Beta冲刺--冲刺总结
    Beta冲刺<4/10>
    实验四
    结对编程第二阶段
    实验二 结对编程第一阶段
    实验报告
    团队作业第六次——Beta冲刺
  • 原文地址:https://www.cnblogs.com/Gbeniot/p/11678404.html
Copyright © 2011-2022 走看看