Postgresql 为什么不是';t Postgres在使用psql时提示输入密码?
给定以下pg_hba.conf,为什么Postgres在运行Postgresql 为什么不是';t Postgres在使用psql时提示输入密码?,postgresql,Postgresql,给定以下pg_hba.conf,为什么Postgres在运行psql-h localhost-p 5555--username=mydb时不提示输入密码 local postgres postgres trust local mydb mydb md5 local mydb mydb password host mydb mydb 0.0.0.0/0 password host mydb mydb 0.0.0.0/0 md5 各国: 用户主目录中的文件.pgpass或PGPASSFILE引用的
psql-h localhost-p 5555--username=mydb
时不提示输入密码
local postgres postgres trust
local mydb mydb md5
local mydb mydb password
host mydb mydb 0.0.0.0/0 password
host mydb mydb 0.0.0.0/0 md5
各国:
用户主目录中的文件.pgpass或PGPASSFILE引用的文件可以包含在连接需要密码时使用的密码(并且没有另外指定密码)
主目录中是否有
.pgpass
文件?@ewcz是的,就是它。请添加您的评论作为回答,我很乐意接受。