Nov 19

Connecting a database in java

[code language="java"]</code>

import java.sql.*;
Connection con = DriverManager.getConnection("jdbc:mysql://yourdatabasehost/Databasename","username","password");


You should download jdbc driver (just google it you will find. It's not an application it is . you should build path to the downloaded jar file. It looks complex but very easy. Feel free to comment. watch the below video.


  1. Naseer

    very good stuff,thanq

  2. admin


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>