This is a fast tutorial, intended for people who understand java, and the basics of SQL/MySQL who just want to see how to use my-sql-connector. How to create a …
Original source
This is a fast tutorial, intended for people who understand java, and the basics of SQL/MySQL who just want to see how to use my-sql-connector. How to create a …
Original source
20 responses to “Java- MySQL Connection (Create Table, Insert, Select)”
The link you provided in the video doesn't seem to be working. Any help? (For Connectors)
helo….i got a communication link failure…!!!!!!
The throws Exception will never throw anything as it is already caught and "handled" in the catch clause of your try. Of course you might eventually pass the error upwards, in which case it'd be used, but as for now, it is technically dead code.
Great work!
I have an issue when I run the code:
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.
Any help please?
Hi, should we write connection code under "public static Connection" ? I am new to java, I dont know why we wrote codes under it?
can you use a data base thats from a free webhosting website like 000webhost? By the way I am using the sub domain version if that helps you
Hi Steven,
Good video.
What is the purpose of the code "Class.forname", i had this is my code but then I commented it out and yet I was able to establish connection to DB and was able to execute my queries and get results.
I will keep it commented unless I find the reason for using it
Do we have to create an account for this???where so in oracle
merciii
I did everything as u said and as it showed in video but it didn`t work! There`s no errors, but it is just empty concole after "Run"
It always shows an error "unknown database"
Hello Steven. Greetings from India. I have a question: Why have you used "try/catch" block and "throws" statement both together in one class. You could have used either of the two??
nice 'shit' folder on your desktop
Hello. You are the greatest. Can I use this on Android Studios aswell.
wow you not e indien/pruttcky
Sir where did the userid and pword came from?
I get the following exception msg:
"com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server."
I am trying to connect to a testdb on my ubuntu vps and I'm sure that I wrote the url, username, password correctly. I'd be glad if you help, thanks.
You could have connected in one line of code.
24.196.52.166:3306 where is this come from ?
can u give me the source to create the account