删除Postgresql服务器默认的postgres数据库



我不知道数据库做了什么,我删除了它,没有意识到现在我将无法再次运行psql。我怎样才能让一切恢复正常?

postgres数据库并不是真正需要的。

但是你可以重新创建它:

psql -U postgres -d template1
psql (13.1)
postgres=# create database postgres;

-d template1通知psql连接template1数据库。

最新更新