Set default database in Intellij IDEA
已回答
That's how my settings look. But as shown by the arrow, it's using old database as default. How do I update default database?
I tried “Switch Schema” setting from this post but it didn't work for me - https://intellij-support.jetbrains.com/hc/en-us/community/posts/360003722640-Set-default-database-and-schema-for-a-project?input_string=Set%20default%20database%20in%20Intellij%20IDEA


请先登录再写评论。
Hi Varun,
Could you check whether right-clicking the data source and selecting Diagnostics | Force Refresh to retrieve the database information from scratch helps after specifying a new database in the General tab?
Hi Anastasia Zhukova Thank you very much. It worked :)
Try setting the desired database as the default schema/catalog in Data Sources and Drivers → Schemas, then Refresh or reconnect the data source. If the old database is still selected, it may be defined by the connection URL or user permissions rather than the schema switcher.