當我試圖連接到postgresql數據庫時,我總是收到一個驗證錯誤。這裏是具體的錯誤:連接到postgresql數據庫
[error] c.j.b.h.AbstractConnectionHook - Failed to obtain initial connection Sleeping for 0ms and trying again. Attempts left: 0. Exception: null.Message:FATAL: password authentication failed for user
我已經檢查和雙重檢查用戶名和密碼,所以這不是問題。我能夠使用psql成功連接到這個完全相同的數據庫。這裏是我的application.conf看起來像
# Database configuration
# ~~~~~
# You can declare as many datasources as you want.
# By convention, the default datasource is named `default`
#
# db.default.driver=org.h2.Driver
# db.default.url="jdbc:h2:mem:play"
# db.default.user=sa
# db.default.password=""
#Database configuration using PostgreSQL database engine
db.default.driver=org.postgresql.Driver
db.default.url="jdbc:postgresql://website.com/database"
db.default.user="username"
db.default.password="password")
# Evolutions
# ~~~~~
# You can disable evolutions if needed
# evolutionplugin=disabled
# Logger
# ~~~~~
# You can also configure logback (http://logback.qos.ch/),
# by providing an application-logger.xml file in the conf directory.
# Root logger:
logger.root=ERROR
# Logger used by the framework:
logger.play=INFO
# Logger provided to your application:
logger.application=DEBUG
68,0-1 Bot
感謝您的洞察力!
推測:pwd中正在使用的任何特殊字符? –
它完全是字母數字 –
抱歉未能完全閱讀該問題。初始評論無效 – Gavin