Thursday, April 12, 2012

Session 0 - JDBC (Java Database Connectivity)

Now the web application is ready, lets create a database in MySQL and lets connect the database in Netbeans.

-> Click on the Services Tab, if you do not find it , click on windows and then click on services.
i have created a database named student into MySQL database, now lets see how to connect that into Netbeans.

->Right click on Databases,
->Click on New Connection,
->Choose Filed Entry from Data Input Mode,
->Choose Drivers from Driver Name Drop Down, (MySQL Connector/J Driver)
->Type host name in Host filed (localhost)
->Type port number on which MySQL service is running, (Generally it is 3306)
->Type the name of the database which you created in MySQL database (student in our case)
->Provide the username of the MySQL database server (Generally it is root)
->Provide the password which you entered while installing MySQL database (Generally it is root)
->Click on OK.




No comments:

Post a Comment