解決不能串連遠程postgresql,串連postgresql

來源:互聯網
上載者:User

解決不能串連遠程postgresql,串連postgresql

    在遠程伺服器上安裝了postgresql,用 pgAdmin添加伺服器始終不行。

   解決辦法:

     在遠端postgresql資料庫上的pg_hba.conf中添加 host  all  all   0.0.0.0/0   trust

     並保證postgresql.conf 中參數設定為listen_addresses = '*'  

   修改完畢後重啟:

    /bea/PostgreSQL/9.3/bin/pg_ctl  stop

    /bea/PostgreSQL/9.3/bin/pg_ctl  start 

    啟動過程中如果報,pg_ctl: no database directory specified and environment variable PGDATA unset  則設定下環境變數

    PGDATA=/bea/PostgreSQL/9.3/data
    export PGDATA  

    如果報CST LOG:  could not create IPv6 socket: 協議不支援的地址族,忽略,不影響串連

  


相關文章

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.