postgresql - 无法运行 'kong migrations bootstrap'(用户 "kong"的身份验证失败)

标签 postgresql centos kong

我正在学习使用Kong。我将它安装在 centos 7 上。我按照 https://docs.konghq.com/install/centos/ 中的教程进行操作我坚持

kong migrations bootstrap [-c /path/to/kong.conf]


我已经按照本教程在 Centos 上安装了 Postgres https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-centos-7
我也已经创建了kong数据库和用户
enter image description here
enter image description here
并且已经执行此命令为 设置密码香港用户
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 迁移 Bootstrap -c kong.conf 我会收到这个错误

Error: [PostgreSQL error] failed to retrieve PostgreSQL server_version_num: FATAL: Ident authentication failed for user "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

最佳答案

对于 IPv4 本地连接:

host all all 127.0.0.1/32 trust
host all all 0.0.0.0/0 trust
我在它的工作中做了这个!

关于postgresql - 无法运行 'kong migrations bootstrap'(用户 "kong"的身份验证失败),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64172293/

相关文章:

postgresql - 在 bool 列上使用 CASE WHEN

linux - 使用 Linux Centos 一次保存多个 URL

PHP 警告 : PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/memcached.so' -/usr/lib64/php/modules/memcached. 所以

kubernetes-ingress - k8s Ingress with Kong - 通过 cURL 与 YAML 的插件应用程序和配置

postgresql - 从函数执行字符串查询

sql - 根据sql中的月份和年份选择一行

php - 配置 : error: memcache support requires ZLIB.

rest - Kong - 如何将 api 与特定的 jwt 消费者关联

node.js - 与kong集成的微服务的用户注册+认证

postgresql - Sequelize 关联表而不定义其架构