maven Liquibase 错误致命错误:用户密码验证失败

maven Liquibase error FATAL: password authentication failed for user

发布此内容是因为过去 post 与此主题相关的任何内容对我都不起作用。 几乎尝试了 SOF

中与此问题相关的所有 post

简要背景

我最近从 Ubuntu 12.01 升级到 14.04。 我的开发环境 运行ning 非常适合 12.01。

具有 LIquibase 目标的 Maven 构建在 12.01 之前都可以正常工作。这仅在 14.04 升级后开始。

环境有 Postgres 9.1 和 12.01 升级后,ubuntu 还安装了 9.3,因为不再支持 9.1。

我在 postgres 安装后遇到了几个问题。 目前我在最新的 14.04 版本中激活了这两个版本。

当前问题:

尝试过的东西

一个。将 pg_hba.conf 更改为 md5、信任和来自 ident 的密码,但没有用。这是我的 pg_hba.conf of (9.1) 的内容:

# Database administrative login by UNIX sockets
local   all         postgres                         trust

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
#local   all         all                               ident
# IPv4 local connections:
host    all         all         127.0.0.1/32         password
# IPv6 local connections:
host    all         all         ::1/128              password
# This is for general access databases:
local   all         all                               trust
host    all         all         127.0.0.1/0           trust

b。还检查了 postgresql.conf 文件中的 listen_address = '*, localhost'

postgresql.conf (9.1)

的简短副本
# - Connection Settings -

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

c。检查了所有相关的 pom.xml。 pom.xml 包含所需的用户和密码详细信息,以及与 postgres 的连接,以便 Liquibase 执行或连接到数据库。

d。还尝试通过 psql 命令提示符进行连接。

psql -d db -U user

工作正常!这里没有问题

在这些设置之后我有 运行

sudo /etc/init.d/postgresql reload

还有

restarted the postgres instances (service postgres restart)

但运气不好!

对 9.3 版本文件也做了同样的事情。

任何人都可以帮助我指导我在哪里遗漏或引导我走正确的道路吗?

提前致谢

正在关闭它,现在可以使用了。 关于这个问题的最终答案请参考最后一条评论。