Ubuntu中的MySQL JDBC jar文件在哪里? [英] Where is the MySQL JDBC jar file in Ubuntu?
问题描述
我已经通过apt-get install
将MySQL 5.5.32安装到Ubuntu 13.04中,我想在Java项目中使用它,为此我必须具有MySql连接器jar.我找不到它.我尝试了locate *mysql*.jar
但它没有找到任何东西.我调查了/etc/mysql
,但是里面没有jar.我不想从Internet下载,因为我认为它以某种方式存在于MySQL文件夹中.不知道连接器jar进入Ubuntu 13.04的位置了吗?
I have installed MySQL 5.5.32 via apt-get install
into Ubuntu 13.04.I want to use it in a Java project.For this i must have MySql connector jar.I can not find it.I tried locate *mysql*.jar
but it did not find anything.I looked into /etc/mysql
but there is no jar in it.I don't want to download it from internet because i believe that it somehow exists in an MySQL folder.Does anybody have any idea where the connector jar went into Ubuntu 13.04?
推荐答案
如果您使用的是19.04之前的Ubuntu版本,则需要安装MySQL JDBC libmysql-java 驱动程序,因为该连接器不在您已安装的Ubuntu打包的MySQL软件包中.之后的版本不会发布该软件包.
If you're using a version of Ubuntu prior to 19.04, you'll need to install libmysql-java, the MySQL JDBC driver, because the connector is not in the Ubuntu-packaged MySQL package that you've already installed. Versions after that do not publish that package.
安装后,您将拥有文件/usr/share/java/mysql.jar
,该文件是指向实际jar文件的间接符号链接.
Once it's installed, you'll have the file /usr/share/java/mysql.jar
, which is an indirect symlink to the actual jar file.
或者,安装 mysql-apt-config 程序包,更新并您将可以使用apt
安装所有当前支持的MySQL软件.
Alternatively, install the mysql-apt-config package, update, and you'll be able to install all currently supported MySQL software with apt
.
这篇关于Ubuntu中的MySQL JDBC jar文件在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!