zoukankan      html  css  js  c++  java
  • centos 7 PostgreSQL一些简单问题以及解决办法

    问题:
    org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
    解决办法:Edit /var/lib/pgsql/data/postgresql.conf file
    Change
    #listen_addresses = 'localhost'
    to
    listen_addresses = '*'

    问题:
    org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "<host_ip>", user "fkong", database "fkong", SSL off
    解决办法:
    Edit /var/lib/pgsql/data/pg_hba.conf file
    Add below line under "# IPv4 local connections:"
    "host    all         all         <host_ip>/32         password"

    问题:
    org.postgresql.util.PSQLException: FATAL: Ident authentication failed for user "fkong"
    解决办法:
    Edit /var/lib/pgsql/data/pg_hba.conf file
    Change
    "host    all         all         <host_ip>/32         ident"
    to
    "host    all         all         <host_ip>/32         password"

  • 相关阅读:
    Mybatis和Hibernate
    SpringMVC运行原理
    HTML中class属性里有多个属性值
    json对象(增加数据)
    Ajax请求
    <url-pattern>里的/和/*
    mysql忘记密码
    Eclipse无法正常连接mysql8.0.20
    a+1和&a+1
    可重入函数与不可重入函数
  • 原文地址:https://www.cnblogs.com/Amos-Turing/p/7404210.html
Copyright © 2011-2022 走看看