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

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

Пікірлер: 101

  • @mayurdighe
    @mayurdighe Жыл бұрын

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

  • @CodeWithArjun

    @CodeWithArjun

    Жыл бұрын

    Glad it helped

  • @06-bhaveshrathod40

    @06-bhaveshrathod40

    11 ай бұрын

    Right bro

  • @barborasipova1332
    @barborasipova13329 ай бұрын

    Love this explanation ! Thank you so much

  • @user-dq5zm7qe7r
    @user-dq5zm7qe7r Жыл бұрын

    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

  • @CodeWithArjun

    @CodeWithArjun

    Жыл бұрын

    Glad I could help

  • @MALF999

    @MALF999

    11 ай бұрын

    seriously?

  • @dinguskhan56
    @dinguskhan5611 ай бұрын

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

  • @djdholan
    @djdholan9 ай бұрын

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

  • @CodeWithArjun

    @CodeWithArjun

    9 ай бұрын

    Glad to hear that

  • @deonvogg9616
    @deonvogg96162 жыл бұрын

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

  • @drakynaace1438

    @drakynaace1438

    Жыл бұрын

    Hahahah

  • @user-ri5sv1um9q
    @user-ri5sv1um9q4 ай бұрын

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

  • @user-oc6tz6ri6d
    @user-oc6tz6ri6d6 ай бұрын

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

  • @florrain1842
    @florrain184210 ай бұрын

    This was amazingly helpful,thanks a lot!!

  • @CodeWithArjun

    @CodeWithArjun

    10 ай бұрын

    Glad it was helpful!

  • @_SurajYadav-lr9fl
    @_SurajYadav-lr9fl8 ай бұрын

    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

  • @milesleaver4968

    @milesleaver4968

    3 ай бұрын

    im doing it in eclipse aswell how do you configure the connector in eclipse

  • @meetslanki3538
    @meetslanki35388 ай бұрын

    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 Жыл бұрын

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

  • @l.r.4006
    @l.r.40066 ай бұрын

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

  • @CodeWithArjun

    @CodeWithArjun

    6 ай бұрын

    Glad it helped!

  • @iftyl1525
    @iftyl15258 ай бұрын

    Thanks a lot brother.

  • @juliobell3470
    @juliobell34702 ай бұрын

    💯Super useful. Thanks!

  • @niki_dee1524
    @niki_dee15242 жыл бұрын

    thx man, you help me, like u

  • @michaelsafwat1953
    @michaelsafwat19534 ай бұрын

    Thank you so much Brother

  • @rashmikaabeyrathna9397
    @rashmikaabeyrathna93977 ай бұрын

    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

    7 ай бұрын

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

  • @bhargavijethva7958
    @bhargavijethva79584 ай бұрын

    Very nice explanation⭐

  • @premar9937
    @premar99378 ай бұрын

    Thank you👍

  • @adeshyaduvanshi2482
    @adeshyaduvanshi2482 Жыл бұрын

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

  • @CodeWithArjun

    @CodeWithArjun

    Жыл бұрын

    Glad it was helpful! Keep coding.

  • @raviajagiya9794
    @raviajagiya9794 Жыл бұрын

    Finally I done it thnx bro

  • @CodeWithArjun

    @CodeWithArjun

    Жыл бұрын

    Welcome 👍 Ne sure to subscribe.

  • @vendara5173
    @vendara5173 Жыл бұрын

    Thanks you so much

  • @l1keeN
    @l1keeN Жыл бұрын

    Very useful video. TY, indian bro!

  • @CodeWithArjun

    @CodeWithArjun

    Жыл бұрын

    Happy to help. But I am Nepali

  • @lungelongobese212
    @lungelongobese212Ай бұрын

    Amazing content fam🙏

  • @CodeWithArjun

    @CodeWithArjun

    Ай бұрын

    Thanks for coming

  • @system.out.printlnsmartert5781
    @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.

  • @andreylion8140
    @andreylion81406 ай бұрын

    You are really cool, man. Thanks!

  • @CodeWithArjun

    @CodeWithArjun

    6 ай бұрын

    I appreciate that!

  • @curiousnepal
    @curiousnepal2 жыл бұрын

    Nice man !!!

  • @CodeWithArjun

    @CodeWithArjun

    2 жыл бұрын

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

  • @sjjjaiswal6521
    @sjjjaiswal6521 Жыл бұрын

    Very good information

  • @CodeWithArjun

    @CodeWithArjun

    Жыл бұрын

    Thanks

  • @KarolKasperek
    @KarolKasperek Жыл бұрын

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

  • @CodeWithArjun

    @CodeWithArjun

    Жыл бұрын

    Happy to hear that

  • @pitpot2
    @pitpot23 ай бұрын

    youre the best

  • @user-kr9ry1in7o
    @user-kr9ry1in7o6 ай бұрын

    thanks its soo 🤞🤞

  • @user-bx6bj5vw8l
    @user-bx6bj5vw8l2 ай бұрын

    Thanks for this information

  • @CodeWithArjun

    @CodeWithArjun

    2 ай бұрын

    Welcome

  • @ImperialSolo
    @ImperialSolo4 ай бұрын

    Thx Man!

  • @bohdanakachmar6965
    @bohdanakachmar6965 Жыл бұрын

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

  • @CodeWithArjun

    @CodeWithArjun

    Жыл бұрын

    Glad to help. Be sure to subscribe

  • @AlexeySuzdalenko
    @AlexeySuzdalenkoАй бұрын

    fanks a lot, my friend !!!

  • @sandipgole2377
    @sandipgole23772 жыл бұрын

    Thanks man..

  • @CodeWithArjun

    @CodeWithArjun

    2 жыл бұрын

    Always welcome !

  • @user-xm4sq3ee2q
    @user-xm4sq3ee2q4 ай бұрын

    cool video)

  • @maxxi7629
    @maxxi76297 ай бұрын

    thanks! das krazayyyy

  • @TheOneAndOnlyyy
    @TheOneAndOnlyyy Жыл бұрын

    almost gave up on my project thanks bro

  • @CodeWithArjun

    @CodeWithArjun

    Жыл бұрын

    Glad I could help

  • @S-craY
    @S-craY Жыл бұрын

    Tnank you!!!

  • @CodeWithArjun

    @CodeWithArjun

    Жыл бұрын

    Glad to help.

  • @eel546
    @eel546 Жыл бұрын

    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

    Жыл бұрын

    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.

  • @xtwist3779
    @xtwist3779 Жыл бұрын

    good job

  • @CodeWithArjun

    @CodeWithArjun

    Жыл бұрын

    Thank you! Cheers!

  • @ahappypotato9549
    @ahappypotato9549 Жыл бұрын

    thank you very much

  • @ahamedhamthan6992
    @ahamedhamthan6992 Жыл бұрын

    so much usefull. thanks a lot

  • @CodeWithArjun

    @CodeWithArjun

    Жыл бұрын

    Glad to help. Be sure to subscribe.

  • @nirajkc224
    @nirajkc224 Жыл бұрын

    thanks.

  • @CodeWithArjun

    @CodeWithArjun

    Жыл бұрын

    You're welcome

  • @ticket1159
    @ticket11596 ай бұрын

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

  • @maxxi7629
    @maxxi76297 ай бұрын

    i love yo

  • @Rob-J-BJJ
    @Rob-J-BJJ6 ай бұрын

    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 Жыл бұрын

    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. . .

  • @agathiyabaskar7246
    @agathiyabaskar72469 ай бұрын

    How to add the jar file path while coding in notepad

  • @prajwalshetty2633
    @prajwalshetty2633 Жыл бұрын

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

  • @8bpnoobie832
    @8bpnoobie832Ай бұрын

    how can i add the jar file in vs code?

  • @omniamahmoud6604
    @omniamahmoud66042 ай бұрын

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

  • @jaykumarpawar6591
    @jaykumarpawar659111 ай бұрын

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

  • @trungdinh450
    @trungdinh4502 жыл бұрын

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

  • @CodeWithArjun

    @CodeWithArjun

    2 жыл бұрын

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

  • @user-bu8mg7uq3s
    @user-bu8mg7uq3s Жыл бұрын

    thank you

  • @pratibhanevhare2757
    @pratibhanevhare27576 ай бұрын

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

  • @infinitespace1982
    @infinitespace19823 ай бұрын

    I get communications link failure, any idea why?

  • @daniilkobzar4869
    @daniilkobzar4869 Жыл бұрын

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

  • @sen7826

    @sen7826

    Жыл бұрын

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

  • @diptipatil6200
    @diptipatil62002 жыл бұрын

    How to include jar file in classpath

  • @CodeWithArjun

    @CodeWithArjun

    2 жыл бұрын

    I have got video on that. Check out on my channel.

  • @diptipatil6200

    @diptipatil6200

    2 жыл бұрын

    @@CodeWithArjun yes sure

  • @sandy6T9
    @sandy6T9 Жыл бұрын

    bro are you nepali ?

  • @CodeWithArjun

    @CodeWithArjun

    Жыл бұрын

    Yes bro. I am.

  • @CopyCoderX
    @CopyCoderX5 ай бұрын

    i know you are nepali, arent you ??

  • @CodeWithArjun

    @CodeWithArjun

    5 ай бұрын

    i am

  • @vitz8572
    @vitz857210 ай бұрын

    Content is fine but accent is very difficult to bear

  • @danvelc9912

    @danvelc9912

    7 ай бұрын

    Just bear with it

  • @Homosapienin134

    @Homosapienin134

    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

    5 күн бұрын

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

  • @user-dp8kk3ju8k
    @user-dp8kk3ju8k3 ай бұрын

    cool video)