Home > Software design >  Access Postgresql database from WSL2 on windows in tableplus
Access Postgresql database from WSL2 on windows in tableplus

Time:04-16

I have a postgresql database on wsl2. But i want to open this in Tableplus. I also run applications in wsl2. I can access those in the browser with localhost:3000 or whatever port. But i can't connect to the database on localhost:5432

What am i doing wrong here?

CodePudding user response:

It's most likely a configuration error in postgres. Standard configuration in postgres in postgresql.conf only listens to localhost. So you need to change it to:

listen_addresses = '*'

You can find the location of the file, by going into psql and running the following query:

SHOW config_file;

  • Related