-
-
Save vinnycrazzy/5f1f61df5614c392ffb08b7c1a19fb8d to your computer and use it in GitHub Desktop.
Connect PgAdmin4 on WSL2 Ubuntu 20.04.3 LTS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -u postgres psql -c 'SHOW config_file' | |
sudo nano /etc/postgresql/13/main/postgresql.conf | |
# uncomment line 59: | |
#------------------------------------------------------------------------------ | |
# CONNECTIONS AND AUTHENTICATION | |
#------------------------------------------------------------------------------ | |
# - Connection Settings - | |
listen_addresses = 'localhost' # what IP address(es) to listen on; | |
#------------------------------------------------------------------------------ | |
# Save file and restart | |
sudo service postgresql stop | |
sudo service postgresql start | |
# https://www.pgadmin.org/download/pgadmin-4-windows/ | |
# Download it here and install it. | |
# In the popup Create — Server window: | |
# General tab: I set Name to test | |
# Connection tab: I set Host name/address to 127.0.0.1 (Note: some post said you can set it as localhost, but it causes errors for me) | |
# port:5432 | |
# Leave maintenance database and Username as default postgres | |
# Password: whatever password you set up earlier for PostgreSQL in WSL 2, click Save password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment