And the lower mounting pgsql WSL connected navicat

APT-GET Update sudo
APT install postgresql
the Do you want to the Continue [Y / the n-] -? Fill Y Wait for completion
vi /etc/postgresql/10/main/postgresql.conf (10. have to view the files in the folder you postgresql )

Review # listen_addresses = 'localhost' is listen_addresses = '*'
Review # password_encryption = on password_encryption = on to
modify the port number, and port number to avoid conflict of local pgsql

/etc/postgresql/10/main/pg_hba.conf VI
! [inserted here described image] (https://img-blog.csdnimg.cn/20191228131403169.png?x-oss-process=im Here Insert Picture Descriptionupstream adding the IPv4
local all all trust
under the IPv4 Add
Host All All 0.0.0.0/0 MD5
Host All All 192.168.3.0/24 MD5 (choose your ip address)

After modifying your
ALTER USER postgres WITH PASSWORD 'postgres' ; change your password
to start pgsql
Service Start PostgreSQL
If there is a local mysql, pgsql or small can be directly connected local partners, but the profiles of code where we wanted to change 127.0.0.1

Published 19 original articles · won praise 0 · Views 3255

Guess you like

Origin blog.csdn.net/Betteryun/article/details/103743562