Inside Out

Notes on seeking wisdom and crafting software

How to : JDBC with MySQL

JDBC (Java Data Base Connectivity) is the basic driver used to connect Java applets or applications to various databases. Here are some of the resources to get started with JDBC :



1. Start off with installing the Connector/J package (mysql-connector-java) from [here]( Details are [here]( 2. Next just extract the files in the *tar.gz* archive using :

`tar -xvzf mysql-connector-java.tar.gz` 3. Then just copy the *jar* files to any directory. I moved the *jar* files to */usr/share/java* 4. Then we got to edit the CLASSPATH variable so edit the .bashrc file to contain following options :

`JAVA_HOME=/usr/java/jdk1.5.0_06/  #root directory where jdk is present  `

export JAVA\_HOME  



export CLASSPATH  


Then try and test the stuff as mentioned [here](

technorati tags:[jdbc](, [java](, [mysql](, [database](, [dbms](