vrijdag 13 augustus 2021

Postgres DBs in WSL2 not Showing in PGAdmin

Via PostgreSQL by /u/CommonMeaning

I just bought a new PC and I'm setting up my Postgres DB for my Rails apps (running Rails on localhost) to try to replicate what I had on my old PC.

I installed WSL2, Postgres, and PGAdmin (on Windows).

I know that Postgres is running because I can query the database in WSL2 through the Rails console (and can create and retrieve data). Also, when I am using WSL2 through Ubuntu on my Windows machine, if I try to create the DB in Rails, it says my development and test DBs already exist.

However, when I try to connect to the DB PGAdmin and DBeaver both do not see the DB.

Usually, when a DB is created in Rails for me, it automatically shows up when I refresh. With these, they don't show, and if I try to add a DB with the same name I created for my Rails app, it lets me (and there are no tables, so I know it's not the WSL2 DB Rails is using).

https://preview.redd.it/7c8agqfwsyg71.png?width=1227&format=png&auto=webp&s=b20ed33fe8edd7b8c84fed06829f4d47eb413de5

https://preview.redd.it/jiobo93ysyg71.png?width=1221&format=png&auto=webp&s=f150e1219e1a49ef6d89ab6f4a0379fd1193079d

I have also tried to use 127.0.0.1 for the host for the server, but it doesn't work.

I'm completely stumped. Any guidance would be appreciated. Thank you!

submitted by /u/CommonMeaning
[link] [comments]

New article matched for in your Blogger! rule

Testing Wide Production 2020