简体   繁体   中英

How to download Mysql jdbc jar file on centos

Sorry for my noobness. I'm very newbie in linux and using CentOS. I need to download Mysql jdbc and place it in somewhere. So I searched on Google and couldn't get any proper result. All results say that download it from http://dev.mysql.com/downloads/connector/j/5.1.html site or download rpm and install it. But I really don't know how to download it first.

I finally figured it out. I just need to write this on the console

wget http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.30.tar.gz. -O /tmp/mysql-connector.tar.gz 

Then it downloads mysql-connector.tar.gz file in /tmp directory and to extract it I used this command:

tar -xvzf mysql-connector.tar.gz

Debian based distros (eg ubuntu):

apt-get install libmysql-java

Redhat based distros (eg centos):

yum install mysql-connector-java

These packages will install the latest MySQL JDBC connector jar which takes some of the headache out of downloading and ensuring the jar is in the correct folder in the classpath for your app. You may still need to move the jar to a specific folder in your classpath but I've found that it just works for hive and some other hadoopy things.

  1. Download Connector/J from here http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.30.tar.gz
  2. extract it and use it

转到Mysql JDBC连接器并选择独立于平台,单击下载具有tar.gz格式的选项,它将被下载并提取到当前的本地驱动器。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM