运维笔记 -- psql: FATAL: database "postgres" does not exist

服务器终端,以postgres用户操作数据库,异常:

postgres@test:~$ psql
psql: FATAL: database "postgres" does not exist

处理方式:

psql终端执行:(这里是指:用类似Navicat工具连接执行,或者以psql template1临时用户连接) 然后执行如下命令。

create user postgres supperuser;
select usename from pg_user;

猜你喜欢

转载自www.cnblogs.com/hellojesson/p/12763025.html