I was using DBeaver and all of the sudden, I could no longer access my previous PostgreSQL databases or create new ones. I got the error 'FATAL: database "postgres" does not exist' when trying to open one. I am running Windows 10, the latest version of DBeaver, and Postgres 10.6-1. I am very new to all this, all help is appreciated! :)
2 Answers
In Database Navigator > Right click on PostgreSQL > Edit Connection
In Connection settings > general tab, enter your host (e.g. localhost), database (e.g. postgres) and leave User blank. Check Show all databases.
Right click on PostgreSQL and refresh. You should get a green checkmark in the PostgreSQL icon.
That's how I fixed mine, hopefully it'll work for you too.
Like Joseph, I had to leave the localhost but I had to clear all the fields, tick Show Databases:
Then refreshing on the databases I got prompted for the Username and Password (must have been an old version in cache):
This works, and you'll see there's potentially more than one schema: