当前环境:

postgresql: 11.5
windows 10 企业版LTSC   64位

当运行"C:\Program Files\PostgreSQL\11\scripts\runpsql.bat" 的时候,发现了这个错误。

Postgres psql: 致命错误:  角色 "postgres" 不存在

原因

原因是:PostgreSQL角色没有被创建。运行命令:createuser -s -r postgres 即可。

如果找不到createuser这个命令,可以在\PostgreSQL\11\bin中找到。添加到系统path中,或cd到这个文件夹再运行。

相关文章:

  • 2021-12-02
  • 2022-01-27
  • 2021-04-07
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-25
  • 2022-12-23
  • 2021-12-01
  • 2021-07-16
相关资源
相似解决方案