MySQL Database connection in java 12 using eclipse 2019

preview_player
Показать описание
In this video I going to show you how to connect java 12 application with MySql database
I have already maded on video on java database connection with mysql but that was on java 8
the method which I had used on that video will not work on java 10 onwords.

So In this video I will show you method which will work on all the version of java

For connecting java application with the mysql database, you need to follow 5 steps to perform database connectivity.

In this example we are using MySql as the database. So we need to know following informations for the mysql database:

Connection URL: The connection URL for the mysql database is jdbc:mysql://localhost:3306/test where jdbc is the API, mysql is the database, localhost is the server name on which mysql is running, we may also use IP address, 3306 is the port number and test is the database name. We may use any database, in such case, you need to replace the test with your database name.
Username: The default username for the mysql database is root.
Password: The default password for the mysql database is ""(blank).Password is given by the user at the time of installing the mysql database. In this example, we are going to use "" as the password.
Let's first create a table in the mysql database, but before creating table, we need to create database first.

create database test;
use test;
create table user(user_id int primary key, user_name varchar(100), user_email varchar(100), user_password text);

-----------------------------------

Two ways to load the jar file:
set classpath
1) Import as I have shown In this video from IDE
2) set classpath:
There are two ways to set the classpath:
temporary
permanent
How to set the temporary classpath
open command prompt and write:
How to set the permanent classpath

Follow along with me In this video to learn each and every thing I have explained in details

#JAVA12 #MySQL
Рекомендации по теме
Комментарии
Автор

Thank you so much sir . This video helped me a lot

shreyashet
Автор

you really saved me bro, i was searching for this everywhere.. so thank you for teaching us and all the best..keep it up :)

vishalsuryawanshi
Автор

thanks man your instruction were simple and good and it worked for me

hapogenmanrow
Автор

If i want to run my application on any other system.i need to install server.how can we do DB connection so that it is embedded in our application only?

dev_expo
Автор

This is very helpful bro. Thank you so much

md.atiqurrahaman_
Автор

hi i'm having a reaaly specific problem where i can't connect java to a remote database (on raspberry pi B+) The console says the following error: Client does not support authentication protocol requested by server; consider upgrading MariaDB client
null" No sure what it means or if it has anything to do with this. I was still wondering if you could help

AndresRodriguez-vvfs
Автор

Thank You Very Much...It was very helpful🙏😄

TruptiJagtap
Автор

nice video..Its working ..thanks for sharing such great videos...

websneek
Автор

You know you are great. no no no you are greatest. no no no is there any word that asked you for your dooooper videoo .... amazing videoo I solve my all problems you are my life saver... Thankyou so niceeee at that time i can't control my

technicalhub
Автор

i am facing some problem while running it..its showing
Communications link failure

avijeetkumar
Автор

Mine is complaining about line 78.It says it's deprecated.I had to downgrade to 5.1

bobogadlela
Автор

How to open the jar file after it downloaded.do we have to extract..where we have to save the jar file.

krishnavaibhav
Автор

how can we select the databass
its an err. for me

rupeshverma
Автор

how i make it for login and after edit an variable on it? like an access token?

alessandrochannels
Автор

Field 'user_id' doesn't have a default value
what to do when i get this error

NagendraKatikireddy
Автор

is there a way to enclose this connection code so that we wont have to type it on each and every buttons action?

carlknightcoph
Автор

Thank you Sir for making this video . You are such a good teacher
Again thank you
This is my first java insert program
Keep making this type of video to teach every one
7-5-2020 9:03 am
Bhargav Patel

bhargavpatel
Автор

What to do if exception occurs in main function of this project 🤔

purbabanerjee
Автор

What to do if classpath is not found in build path library

raimaroy
Автор

Hi, I'm having this problem can you please suggest me the solution.

"Client does not support authentication protocol requested by server; consider upgrading MySQL client "

AbdulRehman-eqns
visit shbcf.ru