简体   繁体   中英

Access Postgresql database from WSL2 on windows in tableplus

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?

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;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM