Connect Java with Mysql Database | Java JDBC | Java Database connectivity | JDBC MySql | ArjunCodes

Sdílet
Vložit
  • čas přidán 10. 07. 2021
  • how to connect Java application with MySQL database, inserts a row to a table and get all rows data from that table. We will add mysql-java-connector jar file in Intellij. We follow 5 steps while connecting Java application with any Database(Mysql) and getting data from database :
    1. Register the Driver class
    2. Create connection
    3. Create statement
    4. Execute queries
    5. Close connection
    Source Code JDBC : github.com/youtube-arjun-code...
    Install Intellij : • Install intellij in wi...
    ➡️ Support me
    PayPal : paypal.me/codewitharjun
    Patreon : / codewitharjun
    ➡️ Subscribe : / codewitharjun
    Stay Connected :
    ➡️ LinkedIn : / arjungautam1
    ➡️ Github : github.com/arjungautam1
    Join Community :
    ➡️Discord : / discord
    Follow me on :
    ➡️ Medium: / codewitharjun
    ➡️ Dev.to : dev.to/codewitharjun
    #java #javaprogramming #javatutorialforbeginner #mysqlconnectionjava #CodeWithArjun #Programming

Komentáře • 104

  • @mayurdighe
    @mayurdighe Před rokem +22

    simple program is what I needed and you provided. Otherwise people keep explaining all other nonsense. Thanks man.

  • @dinguskhan56
    @dinguskhan56 Před rokem +4

    i was missing the mysql connector jar file and thanks to you, now my project works fine.
    Thank you for sharing!

  • @_SurajYadav-lr9fl
    @_SurajYadav-lr9fl Před 9 měsíci +1

    thank you thank you so much bhai , i have been searching for such video for 2 weeks ,but I was getting error everywhere . but finally using this video I got setup my jdbc with my eclipse , now I can learn advance java , again thank you so much bro

  • @barborasipova1332
    @barborasipova1332 Před 10 měsíci +1

    Love this explanation ! Thank you so much

  • @deonvogg9616
    @deonvogg9616 Před 2 lety +11

    u are ze best java developer in ze world thanks indusian peaople risin loh

  • @user-ri5sv1um9q
    @user-ri5sv1um9q Před 5 měsíci +1

    Thnx for giving such a valuable information through a single program❤it really help me alot😊to leran.

  • @user-oc6tz6ri6d
    @user-oc6tz6ri6d Před 7 měsíci +1

    i was really having a hard time understanding this , thank u soooo much it was well explained

  • @djdholan
    @djdholan Před 10 měsíci +3

    i sow around more than 20 videos on connectivity but your video help me really
    thanks from my heart❤‍🔥

  • @user-dq5zm7qe7r
    @user-dq5zm7qe7r Před rokem +5

    Thank you very much brother, I had been trying and trying for 5 hours without success but thanks to you I was finally able to do it, thank you very much I really appreciate it

  • @meetslanki3538
    @meetslanki3538 Před 10 měsíci +2

    i have seen a lot of videos and tried to connect with database and fetch the data from java but i did not get any output. i got bunch of error. however i saw your video and tried to connect with database. i succeed thus i thankful to you.

  • @BoredTAK5000
    @BoredTAK5000 Před rokem +1

    I was having so much trouble with the official sql connector thanks to this fix I should be able to fix it

  • @juliobell3470
    @juliobell3470 Před 4 měsíci +1

    💯Super useful. Thanks!

  • @l.r.4006
    @l.r.4006 Před 7 měsíci +1

    thank you very much, I needed to create a mysql application for a class and your tutorial was invaluable to me

  • @iftyl1525
    @iftyl1525 Před 9 měsíci +1

    Thanks a lot brother.

  • @newwoodmovies9228
    @newwoodmovies9228 Před 10 dny +1

    thank you so much

  • @niki_dee1524
    @niki_dee1524 Před 2 lety +2

    thx man, you help me, like u

  • @florrain1842
    @florrain1842 Před 11 měsíci +1

    This was amazingly helpful,thanks a lot!!

  • @michaelsafwat1953
    @michaelsafwat1953 Před 5 měsíci +1

    Thank you so much Brother

  • @bhargavijethva7958
    @bhargavijethva7958 Před 5 měsíci +1

    Very nice explanation⭐

  • @premar9937
    @premar9937 Před 10 měsíci +1

    Thank you👍

  • @vendara5173
    @vendara5173 Před rokem

    Thanks you so much

  • @rashmikaabeyrathna9397
    @rashmikaabeyrathna9397 Před 8 měsíci

    i'm ubuntu linux user. i use mysql from my terminal. i followd exact steps you showd except data base stuff. it works.

    • @rashmikaabeyrathna9397
      @rashmikaabeyrathna9397 Před 8 měsíci

      i didn't start localhost manually. look like linux has take care about that by itself.

  • @ImperialSolo
    @ImperialSolo Před 5 měsíci +1

    Thx Man!

  • @pitpot2
    @pitpot2 Před 4 měsíci +1

    youre the best

  • @user-xm4sq3ee2q
    @user-xm4sq3ee2q Před 5 měsíci +1

    cool video)

  • @user-kr9ry1in7o
    @user-kr9ry1in7o Před 7 měsíci +1

    thanks its soo 🤞🤞

  • @maxxi7629
    @maxxi7629 Před 8 měsíci +1

    thanks! das krazayyyy

  • @KarolKasperek
    @KarolKasperek Před rokem

    oh my fucking od i was looking for some tutorial about java jdbc whole week. Thanks bro, cheer, love you so much

  • @AlexeySuzdalenko
    @AlexeySuzdalenko Před 2 měsíci

    fanks a lot, my friend !!!

  • @adeshyaduvanshi2482
    @adeshyaduvanshi2482 Před rokem +1

    thank u so much....that was helpful❤

  • @raviajagiya9794
    @raviajagiya9794 Před rokem +1

    Finally I done it thnx bro

  • @ahappypotato9549
    @ahappypotato9549 Před rokem +1

    thank you very much

  • @lungelongobese212
    @lungelongobese212 Před 2 měsíci +1

    Amazing content fam🙏

  • @system.out.printlnsmartert5781

    How did you call the sql string in the resultset? When I make the resultset I can only call the url, username, and password strings.

  • @l1keeN
    @l1keeN Před rokem +2

    Very useful video. TY, indian bro!

  • @andreylion8140
    @andreylion8140 Před 7 měsíci +1

    You are really cool, man. Thanks!

  • @curiousnepal
    @curiousnepal Před 3 lety +1

    Nice man !!!

    • @CodeWithArjun
      @CodeWithArjun  Před 3 lety

      Yo sab Magg Creation ko canva wala course ko kamaal ho.

  • @sjjjaiswal6521
    @sjjjaiswal6521 Před rokem +1

    Very good information

  • @sandipgole1
    @sandipgole1 Před 2 lety +1

    Thanks man..

  • @S-craY
    @S-craY Před rokem +1

    Tnank you!!!

  • @user-bx6bj5vw8l
    @user-bx6bj5vw8l Před 3 měsíci +1

    Thanks for this information

  • @bohdanakachmar6965
    @bohdanakachmar6965 Před rokem +3

    Hey! You really helped me, so thank you so much!!

  • @user-jd7yh1nu2p
    @user-jd7yh1nu2p Před 15 dny +1

    thanks man

  • @xtwist3779
    @xtwist3779 Před 2 lety +1

    good job

  • @TheOneAndOnlyyy
    @TheOneAndOnlyyy Před rokem +1

    almost gave up on my project thanks bro

  • @maxxi7629
    @maxxi7629 Před 8 měsíci +1

    i love yo

  • @nirajkc224
    @nirajkc224 Před rokem +1

    thanks.

  • @eel546
    @eel546 Před rokem +10

    can you please tell us how to make a local database and connect to it, so when i export the project to a .exe it still works??

    • @sen7826
      @sen7826 Před rokem +1

      I am not sure if that can work, because this is supposed to be something that happens at the back end of a website. Exporting to exe is typically for a software application product that someone downloads from the internet.
      But I could be totally wrong.

  • @ahamedhamthan6992
    @ahamedhamthan6992 Před rokem +1

    so much usefull. thanks a lot

  • @Rob-J-BJJ
    @Rob-J-BJJ Před 7 měsíci

    sir you didn't even go over what is xampp or how to use it , that would be something good to know, maybe list it in the description or something at least

  • @yaswanthkadiri8870
    @yaswanthkadiri8870 Před rokem

    But we cannot put this as a global gradle project . . which can have this database as a dependency so it will work in all systems. . .

  • @ticket1159
    @ticket1159 Před 7 měsíci

    so is it same result if i write these codes im netbeans?

  • @priyanshurai4817
    @priyanshurai4817 Před měsícem

    I also need to define SSC certificate while creating connection with db. Need help

  • @user-bu8mg7uq3s
    @user-bu8mg7uq3s Před rokem +1

    thank you

  • @meendum_thamizh
    @meendum_thamizh Před 10 měsíci

    How to add the jar file path while coding in notepad

  • @prajwalshetty2633
    @prajwalshetty2633 Před rokem

    its raising ClassNotFoundException even after installing jconnect how do i solve it

  • @jaykumarpawar6591
    @jaykumarpawar6591 Před rokem

    I have error occur in while loop system.out statement is ')' expected how i can solve this error

  • @omniamahmoud6604
    @omniamahmoud6604 Před 3 měsíci

    I don't have project structure on my IDE, I work on eclipse

  • @8bpnoobie832
    @8bpnoobie832 Před 2 měsíci

    how can i add the jar file in vs code?

  • @trungdinh450
    @trungdinh450 Před 3 lety +1

    how to include jdbc in a spring project. Can u help me ?

    • @CodeWithArjun
      @CodeWithArjun  Před 3 lety +1

      I have already got video on that with title 'Connect Spring Boot with MySql arjuncodes'
      Goto my channel or just search this title on CZcams.
      If you again get problem messsage me on facebook.

  • @pratibhanevhare2757
    @pratibhanevhare2757 Před 7 měsíci

    sir I face this issue while connectivity java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist please solve this problem

  • @infinitespace1982
    @infinitespace1982 Před 4 měsíci

    I get communications link failure, any idea why?

  • @diptipatil6200
    @diptipatil6200 Před 2 lety +1

    How to include jar file in classpath

  • @daniilkobzar4869
    @daniilkobzar4869 Před rokem

    But it not secure to store password in plain text in your code. How can you make it work other way?

    • @sen7826
      @sen7826 Před rokem

      You could ask for the password as a user input before anything else in the program

  • @sandy6T9
    @sandy6T9 Před rokem +1

    bro are you nepali ?

  • @CopyCoderX
    @CopyCoderX Před 6 měsíci +1

    i know you are nepali, arent you ??

  • @vitz8572
    @vitz8572 Před 11 měsíci +8

    Content is fine but accent is very difficult to bear

    • @danvelc9912
      @danvelc9912 Před 8 měsíci +5

      Just bear with it

    • @Homosapienin134
      @Homosapienin134 Před 8 měsíci +7

      Bro İt's clear
      English is not even my first language and İ manage to understand them while speaking
      Don't make a big deal of the accent

    • @ElectrostatiCrow
      @ElectrostatiCrow Před měsícem

      That's the price to pay for learning how to code.😂

  • @user-dp8kk3ju8k
    @user-dp8kk3ju8k Před 4 měsíci +1

    cool video)