moj*_*nes 8 java postgresql jdbc
我正在使用jdbc连接到java应用程序中的postgresql数据库(实际上该应用程序是用Groovy编写的).我有postgresql设置使用'信任'身份验证方法.是否可以在不指定密码的情况下打开jdbc连接?当我尝试使用带有空密码的普通构造函数时,它会失败
Exception in thread "Thread-2" org.postgresql.util.PSQLException: FATAL: password authentication failed for user "myuser"
Run Code Online (Sandbox Code Playgroud)
即使从命令行,这工作正常
psql -U myuser mydatabase
Welcome to psql 8.3.5, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
4325 次 |
最近记录: |