klutt
klutt

Reputation: 31389

How to add a postgresql jdbc driver to intellij?

I'm trying to add a driver, and this page tells me to open View | Tool Windows | Database https://www.jetbrains.com/help/idea/managing-data-sources.html

But there is no such tool window. See picture

enter image description here

I tried Alt-3 since that option is missing in the menu, but nothing happens.

How do I add the postgresql driver from Intellij? I already have the mysql driver.

IntelliJ version: IntelliJ IDA 2020.2.1 Community edition

Upvotes: 5

Views: 17245

Answers (2)

Alen Simonyan
Alen Simonyan

Reputation: 380

If you use Ubuntu.

And the driver cannot be downloaded for some reasons.

And you want manually install the driver then you can download postgreSQL driver from here https://jdbc.postgresql.org/.

Then copy it into PHPStorm config folder using this this path.

/.config/JetBrains/PhpStorm2023.1/jdbc-drivers

enter image description here

After the operation you should get successful connection with your database.

enter image description here

Upvotes: 2

BenjaminD
BenjaminD

Reputation: 554

As you can see here, the Community edition does not include the database tool.

You'll need the Ultimate edition for that.

Then, if you want to just add the library to your project, you can select the project root in IntelliJ, hit F4. Go to Project settings ==> Libraries

Hit the + icon and choose Java.

Then, browse to your driver jar file and select it.

Upvotes: 10

Related Questions