无法通过 Intellij 的数据源和驱动程序连接到数据库

Cannot connect to database through Intellij's Data Sources and Drivers

我在通过 Intellij 的数据源和驱动程序页面显示我的数据库结构时遇到问题。我可以通过使用 spring 项目的 application.properties 连接到托管在 redhat 服务器上的数据库:

spring.datasource.url=jdbc:postgresql://192.168.0.38:5432/cms_database

效果很好。虽然,每当我尝试使用 Intellij 的数据源和驱动程序页面时,我都会得到一个 Error Message:

[3D000] FATAL: database "cms_database" does not exist.

我可以测试连接到数据库“postgres” returns a Connection:

DBMS: PostgreSQL (ver. 13.0) Case sensitivity: plain=lower, delimited=exact Driver: PostgreSQL JDBC Driver (ver. 42.2.5, JDBC4.2) Ping: 16 ms SSL: no

如有任何帮助,我们将不胜感激。如果您需要任何额外信息,我很乐意 post!

尝试使用此示例中的设置进行连接

我想你会错误地设置主机名