Setting up IntelliJ IDEA’s built-in database tools to work with FirebirdSQL requires a particular setup configuration, which I’m documenting here for public consumption.
These setup tools should be applicable to any of JetBrains’ other Java-based IDEs which include database support (e.g. PyCharm, RubyMine, WebStorm, etc.). Note: the following apply to IntelliJ IDEA 12 and the associated platforms, but not to the IDEA 13 platform, which made substantial changes to how databases are configured. The underlying details are consistent, but the interface has changed. I have tested on PyCharm 3.1 to confirm that.
This was all done on OS X 10.9, so I also make no guarantees that this works on other platforms, though the likelihood that it behaves the same on Linux is fairly good. I will update the post if and when I have confirmed that it does.
Steps to configuring a database correctly for use with IDEA/etc. Note that steps 1–3 are fairly obvious; the real point of interest is in steps 4 and 5, which took me the longest time to figure out.
Download the latest version of the Firebird Java drivers for your operating system and your Java version. (You can check your Java version by running
java -versionat the command line.) Extract the downloaded zip file. The extracted folder should include a file named
<version>is currently 2.2.4).
In IDEA, in the database view, add a new data source: in the Database view (accessible via a menu button on the right side of the screen), right click and choose New -> Data Source.
Under JDBC driver files, browse to the location where you extracted the Jaybird driver files and select
Under JDBC driver class, choose
Under Database URL, specify
jdbc:firebirdsql://localhost:3050/followed by either the full path to the database in question or a corresponding alias.1 A full path might look like this on Windows:
With an alias, you would instead have:
Then specify valid values for the User and Password fields from your existing configuration of the database.
Click the Test Connection button and make sure the configuration works.
That should do it. Note that the driver choice and path configuration both matter. On OS X, I found that only the
FBDriver with this (and one other, older-style and therefore not recommended) path setup worked successfully.
I strongly recommend configuring an alias in the aliases.conf file in the Firebird home directory (usually set as
$FIREBIRD_HOMEduring installation on *nix systems). This lets you move the database around at will, update just the configuration file, and not have to update any references to the database file whatsoever.↩