Accessing MYSQL Database Using Java in Eclipse IDE

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
29,615
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Sep 6, 2010

This tutorial will show you how to use Java to query a MySQL database using the Eclipse IDE.

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:
see all

All Comments (67)

Sign In or Sign Up now to post a comment!
  • oh god so simple and so precise... why can't the world be like this :)

  • This tutorial was useful, but i have done step by step and it is working so I have changed the local host into an ip address like getConnection(jdbc:mysql://192­.168.0.4/oe","root",""); but it doesnt work, if something I missed?. I tested my phpadmind and it works and i can access to my php appllication and works aswell. other point, if I change this into local host work normally. any comments?

  • Great tutorials, thank you... Sorry if this next bit is off topic, but what is the screen recording software that you are using? ^_^

  • Hi!Thank you very much for this usefull video!

    I have to do an application with java and database,with graphic interface.It is a project for my faculty.

    And more,I have to add new values from that application!Do you think it is that hard for me??? :))

    Have a nice day!

  • I just tryied your sample from your video and it works real good. The project I'm working is a Web Site. and I wanted to add some kind of edit page in java that can get values from a database and display them in a forum and then let the user make changes to it and then update the database. So far I haven't fount a sample even close to what I'm looking for.

  • Cool Video. Do you have plans for making a Video to show how to use forms in Java. and accessing a mysql database, I been looking for samples and haven't fount any thing that I can use.

  • @TheGydriy Problem was in wrong importing of java.sql.*;

  • In the line: PreparedStatement statement = con.prepareStatement("select * from empl");

    I've got type mismatch exception -

    cannot convert from java.sql.PreparedStatement to com.mysql.jdbc.PreparedStateme­nt

    What am I doing wrong?

  • @Milaad I did get mine working, can't really remember the issue precisely though. One thing I had to do was go to my CPanel and go to Remote Database Access Hosts, and enable the wildcard '%' which allows connections from any IP.

  • @Milaad NVM, I got it, change to

    Connection con = DriverManager.getConnection("j­dbc:mysql://localhost/testdb",­"root","");

    Instead! Much easier!

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more