Setting up a Database in Intellij IDEA

Why? Well, I was sick of always having to install or go to adminer or use another program to view and edit databases. I didn’t know you can actually do this right from within Intellij IDEA.

Hit shift three times and search for database, or click the ‘database’ tab which is located on the right side as a vertical button:

Click database

In the popout window, click the green cross and add your database source. You will now need to add you database details in the modal:

database details

After filling in your details of your database connection, hit ‘test connection’. If you are running vagrant or a container, this will fail… Click SSH/SSl and configure the details of your VM. As you can see below, you might also need to update driver files.

SSH/SSL details

Retest and your connection should now be successful, hit apply, then ok.

If you have more than one database in your VM double click ‘schemas’:

Now you can view and edit data directly in your IDE.