Mysql is a very popular open source database used today.Even it also support enterprise usage.
It was mostly used with php scripting language on web development.
When it time it need to be used with java .
How to configure it ?, how to connect to it ?
Here is quick start.
<a href="http://ipost2host.com/viewtopic.php?f=13&t=2411#" target="_blank">
public class program
public static void main(String args)
// load the mysql jdbc driver, it is an implementation of Driver interface.
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
// create a connection to the mysql database server, select default database and send name and password
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "user1", "pasword1");
// create a statement object for execute sql command.
// There are some addition options availabel. Check out sdk for more information.
stmt = conn.createStatement();
rs = stmt.executeQuery("SELECT * FROM sample");
// print out the field data. You can also use index-based to obtain data in the table fields.
thanks very much for sharing
realy its very usefull