jebnutykokot jebnutykokot - 5 months ago 79
Java Question

How to import java mysql connector to IntelliJ?

how can I import mysql-connector-java-5.1.40-bin.jar file to IntelliJ? I was searching about hour but I cant find nothing.


If you use Gradle:

Just add this line to build.gradle within dependencies { ... }:

compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.40'

If you use Maven:

Add these lines:


If you want to add it without using any build automation systems:

Just drag & drop it to your project and right-click it and choose Add jar as library...