Using JDBC with MySQL, Getting Started

Purpose

The purpose of this Articleis to get you beyond the initial hurdles involved in:

 

  • Downloading and installing a MySQL database server.
  • Preparing that database for use with JDBC.
  • Writing and testing your first JDBC programs to administer the database and to manipulate the data stored in the MySQL database.

 

 

What is JDBC?

JDBC technology is an API (included in both J2SE and J2EE) that provides cross-DBMS connectivity to a wide range of SQL databases and access to other tabular data sources, such as spreadsheets or flat files.

What is MySQL?

The MySQL database server is probably the world’s most popular open source database software, with more than five million active installations as of September 2004.

The database server software from MySQL is available under a “dual licensing” model. Under this model, users may choose to use MySQL products under the free software/open source GNU General Public License (commonly known as the “GPL”) or under a commercial license.

A powerful combination

Simply stated, JDBC makes it possible to write platform independent Java programs that can be used to manipulate the data in a wide range of SQL databases without the requirement to modify and/or recompile the Java programs when moving from platform to platform or from DBMS to DBMS.

MySQL is available for a wide variety of platforms.

Since both JDBC and MySQL are freely available for many purposes, the combination of JDBC and MySQL is a powerful combination that should be of interest for a wide variety of applications.

To Read More Please Visit Developer.com

3 comments

  1. scalazone says:

    @VigilanceAdmin:disqus : I never faced any issues with the JDBC drivers. What kind you issues did you faced ? Could you please elaborate more on this?

    Regards,
    ScalaZone

  2. scalazone says:

    @VigilanceAdmin:disqus : I never faced any issues with the JDBC drivers. What kind you issues did you faced ? Could you please elaborate more on this?

    Regards,
    ScalaZone

  3. Admin says:

    Class.forName(JDBC_DRIVER);
    conn = DriverManager.getConnection(JDBC_STRING, USER_NAME, PASSWD);
    
    stmt = conn.createStatement();
    

Please Post Your Comments & Reviews

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.