this video tells about steps to follow for connecting java program to mysql database. Java JDBC is a java API to connect and execute query with the database.
Original source
this video tells about steps to follow for connecting java program to mysql database. Java JDBC is a java API to connect and execute query with the database.
Original source
34 responses to “16.2 Java Database Connectivity Practical”
i am getting this error : Cannot establish a connection to jdbc:mysql://localhost:3306/bank using com.mysql.jdbc.Driver (CLIENT_PLUGIN_AUTH is required) on netbeans. what to do?
please upload video of connecting Java application to Microsoft SqlServer
am getting MySQLNonTransientConnectionException error
When i am trying to execute in my eclipse .It is showing Could not create connection to database server.Anyone p
lease help me to solve this
Thanks for this video. Something is changed now.
In the url variable, after the database name, i had to add this code "?autoReconnect=true&useSSL=false".
For example, in my case is:
String url = "jdbc:mysql://localhost:3306/serra_databaseprova?autoReconnect=true&useSSL=false";
I you don't do this, ssl error will occur.
After this, in the Class.ForName i had to modify a little:
Class.forName("com.mysql.cj.jdbc.Driver").
I my case, for study database purpose, I don't need ssl security enable, so "?autoReconnect=true&useSSL=false" will disable SSL and also suppress the SSL errors (thanks to stackoverflow).
Thanks Telusko for the video
Awesome Explanation Navin
java.sql.SqlException ——- this is the error i am getting
Sir please tell me the supported driver for oracle10g express edition ….and the code which I should have to write class.forname() code….Pls…….Pls…….sir
Thanks you Telusko sir , your way of teaching is very understandable , thank you again for sharing your knowledge to millions of people , God Bless you , keep doing it .
Navin in this video 16.2 u used a statement that is con.creatstatement() please explain because conection object con is created in the same class then why i need to use the object in the same class
steve jobs
This will help me alot for a School project i am working on thanks… and keep up the good work
Steve Jobs
you are great teacher thanks sir
I write exactly the same code and also made one table in Mysql Workbench but I am getting an error :
Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create a connection to the database server.
Caused by: java.lang.NullPointerException
please help me.
and my password is correct.
@Telusko Learnings You have not taught about Reference Libraries. which jars we need to import in our project.
I did the exact same s u did……but I get" Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. " errorwhat would probably the issue be here…. !! thank you …
how do you get the hyperlink help on key words to pop up those help libraries? do I have to install some help file libraries? if so which ones?
Does it matter what version of JDBC I download if I want to use Microsoft SQL server 2017?
I really liked this video. Very helpful. Had to use the line below for my url
"jdbc:mysql://localhost:3306/db_assignment_two?autoReconnect=true&useSSL=false"
sir what will be the url structure and Driver for sql???
Sir, how to use scrap book in java instead going for workbench and what should be given in URL if scarp book is used
Sir i Followed from A-Z but i am facing this Error: Exception in thread "main" java.sql.SQLException: Unknown initial character set index '255' received from server. Initial client character set can be forced via the 'characterEncoding' property.
Sir, with out using netbeans and eclipse how can we add a library in notepad++ or codeblocks and how can we run this java program.
steve Jobs
Tim Cook
Sir you are my super hero..If I am the owner of DC I will definitely cast you as Superman
Steve jobs
wozniak and steve jobs
How to do it in mac
Would you please shot a video on how to install and set up mysql database on mac and then connect to java.
I am not able to download mysql through maven so how can i download it??
Great tutorial! Which macOS are you using?
my oracle is installed in to two drives c and g .
in c disk oracle folder is there. and in G disk app folder is installed .
in that G disk where app folder is installed in that i have jar file.but in app folder G:appPrashanthproduct11.2.0dbhome_1jdbclib…here i have total 9 jar files with the name of ojdbc5,5g,5dms,6,6g,6dms,simplefan. these are the jar files in my folder . but i added the ojdbc 6 only but i still getting error.
……… so please resolve this issuse..
and at the same time in my encliipse its not showing add external jar file… when am click the librarie folder .it shows module path AND class path … when i am click module path it will show the add external jar file…. sooo please