【发布时间】:2021-01-18 04:11:42
【问题描述】:
我正在学习使用 Kong。我在centos 7上安装它。我按照https://docs.konghq.com/install/centos/的教程进行操作,我坚持
kong 迁移引导 [-c /path/to/kong.conf]
我已经按照这个教程在 Centos 上安装了 Postgres https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-centos-7
我也已经创建了kong数据库和用户
并且已经执行此命令为 kong 用户设置密码
ALTER USER kong WITH PASSWORD 'password';
这是我的 kong.conf
pg_host = 127.0.0.1
pg_port = 5432
pg_timeout = 5000
pg_user = kong
pg_password = password
pg_database = kong
当我执行命令 kong migrations bootstrap -c kong.conf 我会得到这个错误
错误:[PostgreSQL 错误] 无法检索 PostgreSQL server_version_num:致命:用户“kong”的身份验证失败
我在这上面浪费了大约 3-4 个小时。我真的需要帮助。
**编辑这是我的 pg_hba.conf
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
附言。我在某处发现它,建议从
host all all 127.0.0.1/32 ident
host all all ::1/128 ident
【问题讨论】:
-
请将您的
pg_hba.conf的内容添加到您的问题中。 -
@AdrianKlaver 我添加了它。谢谢。
-
不清楚你当前的
pg_hba.conf文件是md5还是ident? -
以下内容为原创。以上是我目前的内容
-
您是否在进行更改后重新加载/重新启动 Postgres 服务器?
标签: postgresql centos kong