Tutorials for beginner - Example to Connect to the MySql Database in Java | Jdbc Tutorials for Beginner | Simplest Way
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:
Driver class: The driver class for the mysql database is com.mysql.jdbc.Driver.
Connection URL: The connection URL for the mysql database is jdbc:mysql://localhost:3306/sonoo 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 sonoo is the database name. We may use any database, in such case, you need to replace the sonoo with your database name.
Username: The default username for the mysql database is root.
Password: Password is given by the user at the time of installing the mysql database. In this example, we are going to use root as the password.
5 Simple easy step to connect mysql in java.
◦ Register the driver class
◦ Creating connection
◦ Creating statement
◦ Executing queries
◦ Closing connection
if you want any video on any language then please comment, we will surely make video on that topic and give explanation in deep.
On this page of the site you can watch the video online Example to Connect Java Application with MySql database| JDBC Tutorials for Beginner | Simplest Way with a duration of hours minute second in good quality, which was uploaded by the user Engineer World 29 June 2017, share the link with friends and acquaintances, this video has already been watched 294 times on youtube and it was liked by 0 viewers. Enjoy your viewing!