我是 postgres 的新手,在服务器重新启动后连接到数据库时遇到困难。我在操作系统用户测试下创建了一个数据库 pgdb。服务器重新启动后,我通过发出命令重新启动 pgsql
service postgresql-9.6 start
启动 postgresql-9.6 服务:[确定]
如果我只是发出 psql,我会被带到 psql 提示符,但这里的数据路径与我之前设置的不同。当我尝试以 postgres 用户身份连接到 pgdb 时,出现错误:
psql:致命:数据库“pgdb”不存在
当我尝试以测试用户身份连接时:
psql -d pgdb
psql:致命:角色“test”不存在
请建议