简体   繁体   中英

How to connect to a remote PostgreSQL database?

There's a PostgreSQL database installed on an external server. I have PostgreSQL installed on my local computer and I'm connected to that server via OpenVPN.

Settings on my local computer:

  • listen_addresses = '*' (postgresql.conf)
  • host all all ::0/0 md5 and host all all 0.0.0.0/0 md5 (pg_hba.conf)

How do I connect to the database on my local computer? What IP address do I need?

The IP address of remote server. You can try psql or pgAdmin.

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