Video Tutorial: How to access MySQL through JDBC?

Ads
 

Video Tutorial: How to access MySQL through JDBC?

Video instruction of accessing MySQL Database through JDBC

Video instruction of accessing MySQL Database through JDBC

How to access MySQL through JDBC?

The interface that is used to access the Relational databases is called JDBC or Java Database connectivity. It can be used to build a connection, provide the queries of the database and update whenever required.

The below list elucidates the process of accessing MySQL through JDBC

  1. Select a Database

  2. Go to Java EE-Eclipse page and select new then go to project option.

  3. In the new project window select java project option

  4. Give a project name in the new Java project window that appears

  5. Click finish

  6. Copy the mysql-connecor-java-5.1.35-bin.jar that was previous downloaded

  7. In the Java-Eclipse window , right click the new java project and create a new folder and name it lib and paste the mysql-connector-java-5.1.35

  8. Right click the new java project and go to properties

  9. Select java build path

  10. Select libraries and open the Add JAR file

  11. Here is the video tutorial of "How to Access MySQL through JDBC?":

  12. In the JAR selection window you can see the new java project and below the lib option select -connecor-java-5.1.35-bin.jar and click ok

  13. Select src and new and then go to package

  14. In new java package folder add a new name with extension .jdbc

  15. Select he new package folder with extension as .jdbc , go to new and select class

  16. In the new java class folder name it as Access database and select finish.

  17. Copy the code from the metadata and paste it in the accessdatabase.java folder

  18. After pasting it select the entire code from the acessdatabase.java folder and format it

  19. Now check for any errors

  20. If error free, then right click and select run as option.

  21. If successful, you can now access Mysql through JDBC.

You can get more information on various operations for insert, update and delete data from the data base on www.roseindia.net

Ads

Ads