Solution to IDEA failure to download database driver

Solution to IDEA failure to download database driver

When using IDEA to connect to the database, the driver download may fail. We can download the driver from the database official website and install it locally.

The following takes Sql Server as an example:

Open the official website and download the driver

Official website address: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads

Go to the bottom of the page and find the driver (connector)

Insert image description here

Click [ Microsoft JDBC Driver for SQL Server ], a new page will open, click download.

Insert image description here

After the download is successful, unzip the compressed package and you will see the following content

Insert image description here

Choose different jars according to your jre version.

Open the database management interface DataSource in IDEA

Insert image description here

Insert image description here

After opening, slide down to find Microsoft SQL Server, click and add the driver file in Driver Files on the right, and click the '+' sign. Select Custom JAR

Insert image description here

Added successfully. Find the decompression path and add jar.

Insert image description here

After the addition is successful, you can connect to the database normally.

Guess you like

Origin blog.csdn.net/Zhang_YingJie/article/details/130169228