5 FREE JAVA VIDEO COURSES – CLICK HERE – https://goo.gl/7i95F8 — View more videos on my “Java JDBC Tutorial” Playlist: http://goo.gl/crT4nS …
Original source
5 FREE JAVA VIDEO COURSES – CLICK HERE – https://goo.gl/7i95F8 — View more videos on my “Java JDBC Tutorial” Playlist: http://goo.gl/crT4nS …
Original source
38 responses to “Java JDBC Tutorial – Part 1: Connect to MySQL database with Java”
hi sir I am 12 years old can u plz upload a series on app development
send me detail notes regarding to spring and hibernate.
roshanbarhate12@gmail.com
Hello Chad, I was wondering, will there be more tutorials?
superb
Hey, nice tut but.. I have a prob.
I made a table with mysql workbench and saved it at C://SQL/test.mwb
Do I use this instead of jdbc:mysql://localhost:3306/Demo ?!
And where do I find the username and password. I never set up a username or password in the mysql ?
Very helpful
The best 9 minutes of my life. Thank you mate for the video.
everything makes sense, but the only part now is that how did you get that line ("jdbc:mysql://localhost:3306/Demo", "student","student") can you break that line down for me?
Tue Jul 25 01:58:17 IST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'demo.employessinfo' doesn't exist
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.Util.getInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2490)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2448)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1381)
at jdbcdemo.Driver.main(Driver.java:18)
i got this every time…
but wait wait wait, homie. How did ya created dat db called localhost and whata is student student whata?
Cool its working, thank you very much a lot you are one of the best teachers on youtube so far for me.
Gracias nos ayudaste mucho. ♥
Easy to learn, concise, just great. Thank you very much!!
The same code throws an exception in the catch block in dynamic web programming. How do I implement it on a Dynamic web project?
thank you sir for that beautiful tutorial..can you explain how to do database connection with java applications written in notepad and using sql plus as back end…please 🙂
If possible can I contact you? Sr
Thanks for your useful video and sharing your knowledge thanks one more time
If anyone knows that how to connect from mysql database to eclipse not from phpmyadmin Thanks
Nice….clear explanation
You are a life saver and a great teacher. Nice and simple! Thank you!
Sun May 28 20:44:54 IST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
You have helped me a lot
Thank you so much!
HELP PLEASE
Mon May 22 15:58:17 EEST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
java.sql.SQLException: Column 'GIAMOURIDIS' not found.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:897)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:886)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860)
at com.mysql.jdbc.ResultSetImpl.findColumn(ResultSetImpl.java:1077)
at com.mysql.jdbc.ResultSetImpl.getString(ResultSetImpl.java:5174)
at databases.Databses.main(Databses.java:17)
very well structured tutorial, thank you this was really helpful!
How can I encrypt the password? I have a project setuped with maven.
Great tutorial man, Thank you!
it's 5 the morning I am working on my Semester project on database adapter, I tried everything that my database teacher show us o the presentation, nothing works, did that for at least 2 hours. Found this video start working in 9 minutes. You man deserve a cookie. Harvard or Yele need to hire you as a teacher I swear. God bless you and take care.
Thank you so much ! You are awesome ! Luv2watch 😉
Do i have to do this process all the time? To copy connector to main project. Or there is a better solution?
Connecting to database…
Mon May 15 22:34:29 IST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Creating statement…
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'emp.employees' doesn't exist
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.Util.getInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2486)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2444)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1381)
at FirstExample.main(FirstExample.java:29)
Goodbye!
solve this error boss
thank you.
hi. how does one connect java application to a remote server ?
Dude!! you are great!!! 😀 <3
I love your voice! makes me so calm!
Very helpful, thank you –
i want to connect to mysql database which is located on remote pc please help.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
How do we connect the same database to different desktops?
I've been following you for a short time and your way of explaining java is really easy for me to understand. Fantastics short tutorials.
Thanks for the tutorial; however, if the web app has a lot of traffic, this method of database implementation will make the app deadly slow. Using connection pool is better and the standard way to implement a java database connection in the Java world. Thanks though !