1

I encountered something weird with connecting to a PostgreSQL database from Tomcat on a Linux server. For some weird reason I cannot connect to the database eventhough if I run the same application and configuration on a Windows machine the authentication works just fine. I can also login with pgAdmin from my Windows machine.

So when I login with pgAdmin I update the password to be the same as it was before and that all off a sudden it works :-S. If I look at the MD5 hash that was generated it's exactly the same as before. Does anybody know what might be going on?

I suspect something with case sensitivity but I can't really figure out how that is possible since I use exactly the same configuration on the Linux server and on the Windows machine.

4

1 回答 1

1

这真是一件愚蠢的事情。我使用错误的语法来创建用户。我从 pgAdmin 复制粘贴了包含散列密码的 SQL 语句,因此当我尝试使用实际密码登录时,身份验证失败。

它在我的 Windows 机器上工作的原因是因为我将我的内部网络配置为受信任,所以它根本没有使用我指定的密码。所以看起来它只能在 Windows 上工作,但实际上并非如此。

于 2012-07-12T18:43:24.460 回答