当主机不是本地主机时,PostgreSQL连接字符串(URL postgres://...
)的格式是什么?
发布于 2013-12-22 02:37:20
如果您将Libpq绑定用于各自的语言,则根据其documentation URI的形式如下:
postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1&...]
下面是同一文档中的示例
postgresql://
postgresql://localhost
postgresql://localhost:5432
postgresql://localhost/mydb
postgresql://user@localhost
postgresql://user:secret@localhost
postgresql://other@localhost/otherdb?connect_timeout=10&application_name=myapp
postgresql://localhost/mydb?user=other&password=secret
发布于 2018-10-09 17:51:03
下面的方法对我很有效
const conString = "postgres://YourUserName:YourPassword@YourHostname:5432/YourDatabaseName";
发布于 2019-08-13 02:23:25
DATABASE_URL=postgres://{user}:{password}@{hostname}:{port}/{database-name}
https://stackoverflow.com/questions/3582552
复制相似问题