Wednesday, December 31, 2008

Servlets and MySQL

1.hi everybody,..... Happy New Year Wishes 2009 for all...

2. the following steps will give you how to run servlets using mysql as DataBase.

3.first download mysql dbase by googling it.
then
A servlet connects to a MySQL database using a MySQL 'Driver'. Go to 
http://dev.mysql.com/downloads/connector/j/5.0.html
and download from 'source and binaries (zip)'
mysql-connector-java-5.0.4.zip
Unzip the file and move 'mysql-connector-java-5.0.4-bin.jar' to
C:\Program Files\Java\jre1.5.0_07\lib\ext\mysql-connector-java-5.0.4-bin.jar

Now you are ready to use an HTML form and Servlet to access your database!

......................Have Nice day..........for details contact jaswanth424@yahoo.co.in

Saturday, December 20, 2008

install mysql and mysql odbc drfiver

1.Open Google.com

2.type download mysql 5.0

3. download the mysql software

4.install it .... just by clicking next and next like that and when asking port numbers and passwords give 3306 (as this is default... do not bother about this).... comming to password give ur own password..

5.one thing is that .... click the check box.....include classpath like that..... now finsh the remainig by clicking next and next and finish...
/////////////////**********************************////////////////////////////////


6........................................................installing jdbc.odbc driver........................

7.go to google.com

8.type as "download mysql connector/j 5.0 for windows".

9.click on windows(x86) and no need to signup the form.... below that a line as............... NO THANKS ........... like present click on that..........

8.select any http mirror and download myssql connector/j5.0.msi..................

9 after downloading install it............just next and next and finish....

********************************************************************************

10.*******************SETTING DSN *********************************

11. GO TO CONTROL PANEL
11.GOTO ADMINTOOLS
12.CLICK ON DATASOURCENAME ICON
13.CLICK ADD BUTTON
14.SCROLL TO THE END OF DRIVERS LIST AND U WILL FIND THERE mysqlconnector odbc driver which u installed....

15.select it and press ok
16.give the any dsn name and and port number by default 3306 and select test as ur database and click test........... connected successfully....
17.click ok
18.click ok...
******************************************************

how to use this in ur JDBC program

Class.forName("com.mysql.jdbc.Driver");
Conncetion con = ("jdbc:mysql://localhost:3306/test","root","password");
***********************************************

any quires post me