Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DBeaver localhost PostgreSQL connection refused

I just installed DBeaver on my personal computer and am trying to create a PostgreSQL database.

I entered the following in the Connect to database window:

  • Host: localhost
  • Port: 5432
  • Database: postgres
  • User: postgres

Those values were all pre-filled defaults, so I left them and clicked the Test Connection... button.

When I click the Test button an error window opens, saying, "Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. Connection refused: connect"

I tried setting my own db name and credentials, but get the same results.

How do I set up a local PostgreSQL database in DBeaver?

like image 493
marky Avatar asked Jun 11 '26 21:06

marky


2 Answers

DBeaver does not allow to setup a local PostgreSQL server or instance: it allows to connect to an existing server or instance. If the PostgreSQL instance does not exist you should install PostgreSQL binaries and create a new database instance with initdb.

like image 59
pifor Avatar answered Jun 13 '26 15:06

pifor


If your operating system is Windows 10 Home, you have to use 192.168.99.100 instead of localhost.

like image 36
Gabriel Hauagge Avatar answered Jun 13 '26 15:06

Gabriel Hauagge