安装 MySQL JDBC 驱动程序 msi

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18894416/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 18:53:36  来源:igfitidea点击:

install MySQL JDBC driver msi

mysqljdbc

提问by faizal

I have downloaded the JDBC driver for MySQL "mysql-connector-java-gpl-5.1.26.msi" from http://dev.mysql.com/downloads/connector/j/. But i can't figure out how to use it. The documentation at http://dev.mysql.com/doc/refman/5.6/en/connector-j-binary-installation.htmlsays it is a zip file which has the required jar file. But what i got is a .msi file. When i execute the msi file it just starts installing and disappears. Any ideas how i can get the jar file from the msi?

我已经从http://dev.mysql.com/downloads/connector/j/下载了 MySQL 的 JDBC 驱动程序“mysql-connector-java-gpl-5.1.26.msi” 。但我不知道如何使用它。http://dev.mysql.com/doc/refman/5.6/en/connector-j-binary-installation.html 上的文档说它是一个包含所需 jar 文件的 zip 文件。但我得到的是一个 .msi 文件。当我执行 msi 文件时,它开始安装并消失。任何想法如何从 msi 获取 jar 文件?

回答by James Allman

The msi installation places the file at C:\Program Files\MySQL\MySQL Connector J\mysql-connector-java-5.1.26-bin.jar.

msi 安装将文件放在C:\Program Files\MySQL\MySQL Connector J\mysql-connector-java-5.1.26-bin.jar.

You can also download the platform independent zip file and extract the jar file whereever you want.

您还可以下载独立于平台的 zip 文件,然后根据需要将 jar 文件解压缩。

回答by BigData

I had the same issue with the installer. use the drop down menu under Select Platform:, and select Platform Independent. If you don't know how to use a TAR archive, download the zip file, unzip and there is the .bin file. For eclipse, drop this into the project directory, find the file, right click, and build path. This method may cause issues if you download a java update.

我对安装程序有同样的问题。使用 Select Platform: 下的下拉菜单,然后选择 Platform Independent。如果您不知道如何使用 TAR 存档,请下载 zip 文件,解压后会出现 .bin 文件。对于 Eclipse,将其放入项目目录中,找到该文件,右键单击并构建路径。如果您下载 Java 更新,此方法可能会导致问题。

回答by Lazy Coder

You can directly used it from C:\Program Files\MySQL\MySQL Connector J\mysql-connector-java-5.1.26-bin.jar after installing the msi. If you are using IDE like Netbeans and Eclipse just go to your project then right click the Libraries folder then click add jar option then go the mysql connector directory and then select the mysql connector jar file.

安装msi后可以直接从C:\Program Files\MySQL\MySQL Connector J\mysql-connector-java-5.1.26-bin.jar中使用。如果您使用像 Netbeans 和 Eclipse 这样的 IDE,只需转到您的项目,然后右键单击 Libraries 文件夹,然后单击添加 jar 选项,然后转到 mysql 连接器目录,然后选择 mysql 连接器 jar 文件。