Java code for mySQL database

What is a Java code that allows you connect to a mySQL database?


    Requires Free Membership to View

    When you register, you will start receiving targeted emails from my award-winning team of editorial writers. Our goal is to keep you informed on the hottest topics and biggest challenges faced by SAP professionals today.

    Hannah Smalltree, Editorial Director

    By submitting your registration information to SearchSAP.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchSAP.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

In order to access a MySQL database (and most standard SQL compliant databases) through Java code you will need a JDBC connector (Java DataBase Connector). For more information on JDBC in general check out java.sun.com/products/jdbc. There are several JDBC connectors for the MySQL database available under various licenses. One is being released under the GPL license (open source) and can be found at: mmmysql.sourceforge.net. Each JDBC connector is implemented differently so you will need to review and understand the API before developing any code. Depending on your need (commercial, personal, prototype, etc.) you will want to use the most appropriate connector. The JDBC connector referenced here is made available at no cost but has no commercial support and is still a fairly immature tool.


This was first published in February 2002