Connect MySQL Database with Java (JDBC) in VS Code.

preview_player
Показать описание
This video explains about how to connect your Java Programs which are meant to connect MySQL Database using JDBC Driver, provided by MySQL Installation (or) through separate driver download, from official MySQL website. 💻🔌

📕 References:
📗 MySQL Community Server Installation:
📙 Microsoft VS Code Installation
📘 Java SE JDK Installation:
1.2 See my previous videos on the topic "JavaFX in VS Code", where I have shown you how to install Java JDK, in detailed.
⌚⏱ Timestamps:
00:00 Introduction
00:47 Installation
04:22 Creating New Project
06:30 Programming JDBC Code
07:25 Importing and Programming
08:08 MySQL Terminal
10:40 Testing
13:40 Conclusion
Рекомендации по теме
Комментарии
Автор

As many of them are getting the issues regarding the ERROR:
I would like share few points.

May be:
1. You haven't imported the correct jar file (jdbc driver from MySQL Installation)
2. Try to clear the workspace cache in VS Code. (don't know how but sometimes VS Code recommends me to do by a notification)
3. Restart the whole procedure...
4. Replace the statement to (suggestion given by VS Code terminal)
Hope it helps.
5. Or the main reason can be, you may not set the path for MySQL bin folder in either system variables or user variables..

The file hierarchy that must be running currently in VS code must be as follows:
ProjectName {
.vscode {
settings.json
}
lib { }
src {
App.java
}
README.md

"Debugger for java" must be installed, so that "Run Java" option will be visible to compile and run.

Hope it works. ✨😀

harshith_takkala
Автор

This explanation is a lifesaver! It was really difficult to find JDBC tutorials in VSCode but this one nailed it .Thanks a lot for uploading this video!

janhavipimplikar
Автор

This video is very helpful. I have tried many times watching other videos but never work. This works well after many mistakes. Thank you very much! Best wishes from Thailand.

ryansatriayudha
Автор

Thanks a lot😭, I was struggling in running this program for 2-3 hours.... Finally I got the solution while scrolling through the comments...Thanks once again..

PrernaSharma-ylih
Автор

thanks innovator,



fyi for some of you guys out there, here are a couple of errors i got and their solution
1)The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
the solution is to change line 7 to :-Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/invoicing", "username", "password");
and change the 0 to 1 on line 12 jic.

kiaehe
Автор

Thank you so much my man. You are a life saver. You deserve many views. Ill try and share with as many people as possible.

tinayetsinakwadi
Автор

You are the boss! No one else has explained where this goddamned classpath was, you're a literal life saver!

arthurbttf
Автор

Great tutorial man 👍
Still working after 2 years!!

akshattrivedi
Автор

Thanks I am trying to run the first jdbc program from last 5 to 6 and your vedio helped thanks so much it really helped

bagwanmohdhuzaif
Автор

Thanks for your tutorial. It saved my life!

wagnerdds
Автор

Well, thanks so much man. It actually worked for me!

ZoomerApp
Автор

Hey ! Thanks for the tutorial but i have a question. Why its works with "Run java" and not with javac + java ?

EnzoLadriere
Автор

i am facing an error in class.forname(in this loction )it is saying com.mysql.jbdc.Driver() doesnot exist. What should i do now

udaan
Автор

I'm very grateful to you Sir!!You did it really well

husnajaved
Автор

Thank you so much bro. I was going to switch to ecllipse but you saved me.

nisarg
Автор

thank you so much<3 you're the best!

ИнкарЖолдыбай-чж
Автор

Hello, I'm having the error, 'java.sql.SQLException: Access denied for user 'USER'@'localhost' (using password: NO). How do i fix it?

joanmambwe
Автор

may i ask you how to show all the columns? i have three columns and it only showed one column

crimson
Автор

call Youtube translator I'm Brazilian. this was the Google translator who translated .Thank you

soueuoctavio
Автор

Just a small doubt, when I run the code its displaying the output in the debug console. Can u suggest a fix ?

ommule