我已经在我的Windows10上安装了PostgreSQL 10.0,在安装过程中它要求我为根用户输入一个密码,并且我已经创建了一个密码。我希望通过命令行运行它并设置环境变量,但是当我试图通过键入
C:\Users\akhil\Documents\Flask Examples\postsql>psql sample.sql
Password:
psql: FATAL: password authentication failed for user "akhil"我已经看到了一些更改pg_hba.conf文件的解决方案,但是它帮不了我。(更新)我也尝试创建一个用户id,但它显示了相同的错误
createuser akhil
Password:
createuser: could not connect to database postgres: FATAL: password authentication failed for user "akhil"发布于 2018-09-29 07:37:03
这将帮助您进入数据库。
psql postgres://username:password@ip_address/database < sample.sqlhttps://stackoverflow.com/questions/52566004
复制相似问题