• Saturday , 21 October 2017

Java- MySQL Connection (Create Table, Insert, Select)

Code Canyon



This is a fast tutorial, intended for people who understand java, and the basics of SQL/MySQL who just want to see how to use my-sql-connector. How to create a …

Original source

3d Ocean

Related Posts

20 Comments

  1. Worldhomicide
    September 19, 2017 at 10:31

    The link you provided in the video doesn't seem to be working. Any help? (For Connectors)

  2. sharath sunny
    September 19, 2017 at 10:31

    helo….i got a communication link failure…!!!!!!

  3. iceshadow625
    September 19, 2017 at 10:31

    The throws Exception will never throw anything as it is already caught and "handled" in the catch clause of your try. Of course you might eventually pass the error upwards, in which case it'd be used, but as for now, it is technically dead code.

  4. Rodolfo Morales
    September 19, 2017 at 10:31

    Great work!
    I have an issue when I run the code:

    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.

    Any help please?

  5. N.C masterkill
    September 19, 2017 at 10:31

    Hi, should we write connection code under "public static Connection" ? I am new to java, I dont know why we wrote codes under it?

  6. StickMan1316
    September 19, 2017 at 10:31

    can you use a data base thats from a free webhosting website like 000webhost? By the way I am using the sub domain version if that helps you

  7. Abdul Malik
    September 19, 2017 at 10:31

    Hi Steven,

    Good video.

    What is the purpose of the code "Class.forname", i had this is my code but then I commented it out and yet I was able to establish connection to DB and was able to execute my queries and get results.

    I will keep it commented unless I find the reason for using it

  8. sunidhi naik
    September 19, 2017 at 10:31

    Do we have to create an account for this???where so in oracle

  9. oumayma oulahou
    September 19, 2017 at 10:31

    merciii

  10. Viktoria Pushkina
    September 19, 2017 at 10:31

    I did everything as u said and as it showed in video but it didn`t work! There`s no errors, but it is just empty concole after "Run"

  11. raphael borja
    September 19, 2017 at 10:31

    It always shows an error "unknown database"

  12. Divyansh Jain
    September 19, 2017 at 10:31

    Hello Steven. Greetings from India. I have a question: Why have you used "try/catch" block and "throws" statement both together in one class. You could have used either of the two??

  13. M D
    September 19, 2017 at 10:31

    nice 'shit' folder on your desktop

  14. Dikshanta Ghimire
    September 19, 2017 at 10:31

    Hello. You are the greatest. Can I use this on Android Studios aswell.

  15. דור דורניק
    September 19, 2017 at 10:31

    wow you not e indien/pruttcky

  16. Evaristo Simbulan
    September 19, 2017 at 10:31

    Sir where did the userid and pword came from?

  17. XeroX1907
    September 19, 2017 at 10:31

    I get the following exception msg:

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

    The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server."

    I am trying to connect to a testdb on my ubuntu vps and I'm sure that I wrote the url, username, password correctly. I'd be glad if you help, thanks.

  18. Harry Sax
    September 19, 2017 at 10:31

    You could have connected in one line of code.

  19. Vandel Jason Strypper
    September 19, 2017 at 10:31

    24.196.52.166:3306 where is this come from ?

  20. Vandel Jason Strypper
    September 19, 2017 at 10:31

    can u give me the source to create the account

Leave A Comment

You must be logged in to post a comment.