4.1 Installing Connector/J From A Binary Distribution
4.1 Installing Connector/J From A Binary Distribution
Using Packages for Software Package Management Systems on Linux Platforms: RPM and Debian
packages are available for installing Connector/J on a number of Linux distributions like Oracle Linux,
Debian, Ubuntu, SUSE, and so on. Install these packages using your system's software package
management system.
Configuring the CLASSPATH
Once mysql-connector-java-version.jar has been extracted from the binary distribution package
to the right place, finish installing the driver by placing the JAR archive in your Java classpath, either by
adding its full file path to your CLASSPATH environment variable, or by directly specifying the file path
with the command line switch -cp when starting the JVM.
For example, on Linux platforms, add the Connector/J driver to your CLASSPATH using one of the
following forms, depending on your command shell:
# Bourne-compatible shell (sh, ksh, bash, zsh):
shell> export CLASSPATH=/path/mysql-connector-java-ver.jar:$CLASSPATH
Important
Remember to also add the locations of the third-party libraries required for using Connector/J to
CLASSPATH.