• Friday , 17 November 2017

Java JDBC Tutorial – Part 1: Connect to MySQL database with Java

Code Canyon



5 FREE JAVA VIDEO COURSES – CLICK HERE – https://goo.gl/7i95F8 — View more videos on my “Java JDBC Tutorial” Playlist: http://goo.gl/crT4nS …

Original source

3d Ocean

Related Posts

38 Comments

  1. Pc Solutions
    August 21, 2017 at 04:38

    hi sir I am 12 years old can u plz upload a series on app development

  2. ROSHAN BARHATE
    August 21, 2017 at 04:38

    send me detail notes regarding to spring and hibernate.
    roshanbarhate12@gmail.com

  3. Daelendil
    August 21, 2017 at 04:38

    Hello Chad, I was wondering, will there be more tutorials?

  4. narendra babu
    August 21, 2017 at 04:38

    superb

  5. stathis stathopoulos
    August 21, 2017 at 04:38

    Hey, nice tut but.. I have a prob.

    I made a table with mysql workbench and saved it at C://SQL/test.mwb
    Do I use this instead of jdbc:mysql://localhost:3306/Demo ?!
    And where do I find the username and password. I never set up a username or password in the mysql ?

  6. Mo Adib
    August 21, 2017 at 04:38

    Very helpful

  7. Twisten Tiger
    August 21, 2017 at 04:38

    The best 9 minutes of my life. Thank you mate for the video.

  8. Enrique Perez
    August 21, 2017 at 04:38

    everything makes sense, but the only part now is that how did you get that line ("jdbc:mysql://localhost:3306/Demo", "student","student") can you break that line down for me?

  9. Empti
    August 21, 2017 at 04:38

    Tue Jul 25 01:58:17 IST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'demo.employessinfo' doesn't exist
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
    at com.mysql.jdbc.Util.getInstance(Util.java:408)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2490)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2448)
    at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1381)
    at jdbcdemo.Driver.main(Driver.java:18)

    i got this every time…

  10. wBacz
    August 21, 2017 at 04:38

    but wait wait wait, homie. How did ya created dat db called localhost and whata is student student whata?

  11. K Parks
    August 21, 2017 at 04:38

    Cool its working, thank you very much a lot you are one of the best teachers on youtube so far for me.

  12. MANUEL ALEJANDRO MENDOZA VALENCIA
    August 21, 2017 at 04:38

    Gracias nos ayudaste mucho. ♥

  13. Claudia G
    August 21, 2017 at 04:38

    Easy to learn, concise, just great. Thank you very much!!

  14. Jasleen Kaur
    August 21, 2017 at 04:38

    The same code throws an exception in the catch block in dynamic web programming. How do I implement it on a Dynamic web project?

  15. Fathiha Rahath
    August 21, 2017 at 04:38

    thank you sir for that beautiful tutorial..can you explain how to do database connection with java applications written in notepad and using sql plus as back end…please 🙂

  16. shokhrukh suvanov
    August 21, 2017 at 04:38

    If possible can I contact you? Sr
    Thanks for your useful video and sharing your knowledge thanks one more time

  17. shokhrukh suvanov
    August 21, 2017 at 04:38

    If anyone knows that how to connect from mysql database to eclipse not from phpmyadmin Thanks

  18. thiyan aru
    August 21, 2017 at 04:38

    Nice….clear explanation

  19. Vidal Sisneros
    August 21, 2017 at 04:38

    You are a life saver and a great teacher. Nice and simple! Thank you!

  20. shiva Rebel
    August 21, 2017 at 04:38

    Sun May 28 20:44:54 IST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

  21. santi aldo
    August 21, 2017 at 04:38

    You have helped me a lot
    Thank you so much!

  22. George Giamouridis
    August 21, 2017 at 04:38

    HELP PLEASE

    Mon May 22 15:58:17 EEST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
    java.sql.SQLException: Column 'GIAMOURIDIS' not found.
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:897)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:886)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860)
    at com.mysql.jdbc.ResultSetImpl.findColumn(ResultSetImpl.java:1077)
    at com.mysql.jdbc.ResultSetImpl.getString(ResultSetImpl.java:5174)
    at databases.Databses.main(Databses.java:17)

  23. s1234
    August 21, 2017 at 04:38

    very well structured tutorial, thank you this was really helpful!

  24. jarji de
    August 21, 2017 at 04:38

    How can I encrypt the password? I have a project setuped with maven.

  25. Michael Bailey
    August 21, 2017 at 04:38

    Great tutorial man, Thank you!

  26. Cuibaru Cristian
    August 21, 2017 at 04:38

    it's 5 the morning I am working on my Semester project on database adapter, I tried everything that my database teacher show us o the presentation, nothing works, did that for at least 2 hours. Found this video start working in 9 minutes. You man deserve a cookie. Harvard or Yele need to hire you as a teacher I swear. God bless you and take care.

  27. George Petropoulos
    August 21, 2017 at 04:38

    Thank you so much ! You are awesome ! Luv2watch 😉

  28. Dalibor Petrić
    August 21, 2017 at 04:38

    Do i have to do this process all the time? To copy connector to main project. Or there is a better solution?

  29. Sainath Reddy
    August 21, 2017 at 04:38

    Connecting to database…
    Mon May 15 22:34:29 IST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
    Creating statement…
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'emp.employees' doesn't exist
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
    at com.mysql.jdbc.Util.getInstance(Util.java:408)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2486)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2444)
    at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1381)
    at FirstExample.main(FirstExample.java:29)
    Goodbye!
    solve this error boss

  30. tongxun liu
    August 21, 2017 at 04:38

    thank you.

  31. Edwin Mwangi
    August 21, 2017 at 04:38

    hi. how does one connect java application to a remote server ?

  32. Andreia Marques
    August 21, 2017 at 04:38

    Dude!! you are great!!! 😀 <3
    I love your voice! makes me so calm!

  33. Sebastian Puerta Hincapie
    August 21, 2017 at 04:38

    Very helpful, thank you –

  34. Summit
    August 21, 2017 at 04:38

    i want to connect to mysql database which is located on remote pc please help.

  35. rafay maqsood
    August 21, 2017 at 04:38

    com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

  36. Juts Vasallo
    August 21, 2017 at 04:38

    How do we connect the same database to different desktops?

  37. mggl lvrdo
    August 21, 2017 at 04:38

    I've been following you for a short time and your way of explaining java is really easy for me to understand. Fantastics short tutorials.

  38. engissmeil
    August 21, 2017 at 04:38

    Thanks for the tutorial; however, if the web app has a lot of traffic, this method of database implementation will make the app deadly slow. Using connection pool is better and the standard way to implement a java database connection in the Java world. Thanks though !

Leave A Comment

You must be logged in to post a comment.