Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA: Unable to download MySqlDriver

I am using IntelliJ IDEA,and I want to configure MySQL database from the IDE: enter image description here

then fail: enter image description here

The error is:

Failed to download 'http://download.jetbrains.com/idea/jdbc-drivers/mysql-connector-java-5.1.40-bin.jar

I don't know why connection will time out.

I can download other things such as plugins from jetbrains, but except jdbc-drivers.

like image 356
learner Avatar asked Oct 05 '17 12:10

learner


People also ask

How add JDBC library to Intellij?

To do this in Intellij, right click on Project folder -> Open module settings, this should open a new window. Go to libraries under Project settings and click on add to locate and add the JDBC jar files to the project.

How do I open a Database in Intellij Community Edition?

Overview In the Database tool window (View | Tool Windows | Database), you can work with databases and DDL data sources. You can view and modify data structures in your databases, and perform other associated tasks. To view a table, double-click the table.


2 Answers

I recommend taking a look in IDEA's log files to see if they may have additional details as to why the download is timing out. From the menu go to Help > Show log.

As a workaround, you can manually download the drivers and place them in the necessary location. Download bo the JAR and the mysql-connector-license.txt license file (from http://download.jetbrains.com/idea/jdbc-drivers/mysql-connector-license.txt of from MySQL directly). Place both files in the path {idea-config-dir}/jdbc-drivers/MySQL Connector/J/5.1.40 (modifying the version number if necessary). The location of the {idea-config-dir} can be looked up in the Directories used by the IDE to store settings, caches, plugins and logs help document. For example, c:\Users\Dilbert\.IntelliJIdea2017\config or ~/Library/Preferences/IntelliJIdea2017

Thus, in the end, that directory should have two files:

  1. mysql-connector-java-5.1.40-bin.jar
  2. mysql-connector-license.txt
like image 172
Javaru Avatar answered Oct 08 '22 05:10

Javaru


put jars in

C:\Users\UUSER\AppData\Roaming\JetBrains\DataGrip2020.1\jdbc-drivers\PostgreSQL\42.2.5

from another install with internet

like image 40
JAGJ jdfoxito Avatar answered Oct 08 '22 03:10

JAGJ jdfoxito