简体   繁体   English

远程连接到 postgresql 数据库

[英]Connecting to postgresql database remotely

如何从远程系统使用 bookshelf.js 而不是使用“host: localhost”连接 postgresql

Use the hostname or IP address of the host, instead of 'localhost', like:使用主机的主机名或 IP 地址,而不是“localhost”,例如:

host: "dbserver.example.com"

or或者

host: "203.0.113.1"

Note: if the database is not using the default port (5432) you should also specify it.注意:如果数据库没有使用默认端口 (5432),您还应该指定它。 For example for port 5050:例如端口 5050:

host: "dbserver.example.com:5050"

or或者

host: "203.0.113.1:5050"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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