将 AWS PostgreSQL 连接到 Power BI Desktop:The 证书中不存在指定的主机名

Connect AWS PostgreSQL to Power BI Desktop:The specified hostname was not present in the certificate

我正在尝试将我的 PostgreSQL 数据库连接到我的 Power BI 桌面。

我从 https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem 下载了证书并安装在我的机器上。我收到如下相同的错误

Details: "An error happened while reading data from the provider: 'Npgsql.Tls.ClientAlertException: CertificateUnknown: Server certificate was not accepted. 
 Chain status: A certificate chain processed,
 but terminated in a root certificate which is not trusted by the trust provider.
. The specified hostname was not present in the certificate.
   at Npgsql.Tls.TlsClientStream.SendAlertFatal(AlertDescription description, String message)
   at Npgsql.Tls.TlsClientStream.ParseCertificateMessage(Byte[] buf, Int32& pos)
   at Npgsql.Tls.TlsClientStream.TraverseHandshakeMessages()
   at Npgsql.Tls.TlsClientStream.<GetInitialHandshakeMessages>d__43.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.Tls.TlsClientStream.<PerformInitialHandshake>d__72.MoveNext()'"

我的 Npgsql 版本是 3.2.2.

这样证书导入成功

真不知道为什么还是报错。有人可以帮我解决这个问题吗?

我终于可以使用 ODBC 驱动程序访问数据库了。

Select Others 来自 Get Data 列表和 select ODBC。添加驱动程序(如果需要)并设置数据源。输入您的凭据并连接。

干得好!