Simple MySQL Library for Java - Origional Version

PHP like MySQL programming for Java

This version is out of date. Please see the latest version: Simple MySQL Library for Java


Java is a powerfull langauge, but sometimes the simplest things can be duanting, like MySQL. Introducing a simplier way, a PHP like MySQL library for Java. With this library, you can create simple database applications using similiar functions and methods to PHP.


You will need the MySQL JDBC Driver in order to use this. This is included with Netbeans 6.0

How to use (Example)

In Netbeans 6.0 add the SimpleMySQL Jar to your projects Library files.

import java.sql.*;
import simplemysql.SimpleMySQL;


SimpleMySQL mysql;
mysql = new SimpleMySQL();

//Connect to the Database

mysql.connect("", "db_user", "db_password");

//Do a SELECT Query

ResultSet result;
result = mysql.query ("SELECT * FROM myTable");

//Print all of the Results
            while ({
catch(Exception x) {

//Do an INSERT query
mysql.query ("INSERT INTO myTable (name) VALUES("MyName")");

Where to get it

Download the JAR:
Download the Source:
Download the Netbeans Project Files: