【发布时间】:2020-09-25 08:43:41
【问题描述】:
我正在尝试将 Azure PostgreSQL 用于 CKAN (ckan.org) CKAN 正在使用http://www.sqlalchemy.org/ 进行数据库连接。
连接字符串如下所示:
engine = create_engine('postgresql://scott:tiger@myhost.postgres.database.azure.com:5432/mydatabase')
语法是:
postgresql://username:password@hostname:5432/databasename
尝试连接到 azure postgresql 时出现此错误:
致命:指定的用户名无效。请检查用户名和 重试连接。用户名应采用用户名@主机名格式。
如果我尝试使用这样的用户名格式:
postgresql://scott@myhost:tiger@myhost.postgres.database.azure.com:5432/mydatabase
然后我得到:
端口号无效:“tiger@myhost.postgres.database.azure.com:5432”
有人解决了吗?
【问题讨论】:
标签: postgresql azure sqlalchemy ckan