简体   繁体   English

致命:角色“ postgres”不存在; 我可以看到postgreSQL正在运行,并且可以使用psql连接到表

[英]FATAL: role “postgres” does not exist; I can see postgreSQL running and can use psql to connect to tables

I've seen similar issues posted on here but I can't solve my problem. 我在这里看到过类似的问题,但无法解决问题。 I've had postgres working for a month and last night it stopped working. 我的postgres工作了一个月,昨晚它停止工作了。 I can use psql in the command line to access databases and tables. 我可以在命令行中使用psql来访问数据库和表。 When I connect to localhost and can view a page I've built. 当我连接到localhost并可以查看我建立的页面时。 When I try to log in I believe it's the first time using psql and I get an error page with the FATAL message mentioned above. 当我尝试登录时,我相信这是第一次使用psql,并且出现错误页面,上面显示了致命消息。 When I open Postgres from spotlight I get the message "There is already a PostgreSQL server running on port 5432". 当我从聚光灯下打开Postgres时,收到消息“端口5432上已存在PostgreSQL服务器”。 I also see the mssage "Server startup failed" and "You now have a PostgreSQL server running locally." 我还看到mssage“服务器启动失败”和“您现在有一个本地运行的PostgreSQL服务器”。 It appears postgres is working, but I don't know why out of the blue I'd get this FATAL message on my localhost9292. 似乎postgres正常工作,但是我不知道为什么我会在我的localhost9292上收到此致命消息。 Any suggestions/clarification? 有什么建议/澄清吗? Thanks 谢谢

Perhaps the operating system user you are connecting as doesn't have an account in Postgres. 可能您正在连接的操作系统用户在Postgres中没有帐户。 Try this: psql -U postgres 试试这个: psql -U postgres

Update: current working theory - there is more than 1 Postgres install on the machine, and the default installed one has started instead of the user installed one. 更新:当前的工作原理-在计算机上安装了1个以上的Postgres,并且已开始安装默认的而不是用户安装的。 That would explain why this was working before, and now does not. 那可以解释为什么以前曾经这样做,而现在却没有。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 PostgreSQL:“psql:错误:致命:角色”postgres“不存在”错误 - PostgreSQL: “psql: error: FATAL: role ”postgres“ does not exist” error psql:错误:无法连接到服务器:致命:角色“postgres”不存在 - psql: error: could not connect to server: FATAL: role "postgres" does not exist 如何解决此问题以使用 psql? | psql:错误:致命:角色“postgres”不存在 - How do I solve this problem to use psql? | psql: error: FATAL: role "postgres" does not exist Postgres:psql:严重:角色“ postgres”不存在 - Postgres: psql: FATAL: role “postgres” does not exist psql: FATAL: 角色“postgres”不存在 - psql: FATAL: role "postgres" does not exist 无法连接到PostgreSQL“角色不存在” - Can't connect to postgresql “Role does not exist” NixOS错误:psql:致命:角色“ postgres”不存在 - NixOS error: psql: FATAL: role “postgres” does not exist docker 撰写 psql:错误:致命:角色“postgres”不存在 - docker compose psql: error: FATAL: role "postgres" does not exist psql:致命错误:角色“ postgres”不存在(使用-h localhost选项) - psql: FATAL: role “postgres” does not exist (with -h localhost option) postgres抛出错误psql:致命:角色“用户名”不存在 - postgres throws the error psql: FATAL: role “username” does not exist
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM