我正在学习使用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数据库和用户
并且已经执行此命令为 设置密码香港用户
ALTER USER kong WITH PASSWORD 'password';
这是我的 kong.confpg_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/