Export all databases configuration

Answered

Before re-installing OS(Ubuntu 18.04), I backed up my idea project folder(with .idea folder). I forgot to back-up database connections(BTW, I don't know how it does exactly). After re-installing OS, I copied dataSources.xml and dataSources.local.xml files to the new .idea folder. Databases appear in the menu "Database", but when I'm trying to connect - IDEA asked a database password. I have more than 300 database connections and all of them have the same password.

1) Is there a possibility to set a password only once and apply it to all databases?

2) How to export all database connections with passwords before OS update?

 

Thanks

Regards, Denys

1
3 comments

Hello,

1. No. Here is feature request, please follow and vote: https://youtrack.jetbrains.com/issue/DBE-2083

2.  Passwords are saved by default in native keychain - gnome-keyring or kwallet. Or in local db, you can find it in Settings -> Appearance & Behaviour -> System Settings -> Passwords.

As for now, you can edit all jdbc-url in DataSources.xml with adding password as parameter to connection string if your DBMS allows this.

1
Avatar
Permanently deleted user

Thank you so much, it works!

 

BTW, maybe you know, how to run one SQL select query on multiple data sources with output to the different files? Is it possible at all?

0

You are welcome!

Unfortunately no, it's impossible. You can create a sql-file with your query and in the upper right corner switch session before each 'Execute to file'.

1

Please sign in to leave a comment.