Java JDBC Overview Installing MySQL Database

Published: 12 December 2019
on channel: Easy Learning
751
13

Java Database Connectivity with MySQL
:

To connect Java application with the MySQL database, we need to follow 5 following steps.


In this example, we are using MySql as the database. So we need to know the following pieces of information 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 an IP address, 3306 is the port number and snow is the database name. We may use any database, in such cases, we need to replace the snow with our database name.

Username: The default username for the MySQL database is root.

Password: It is the password given by the user at the time of installing the MySQL database. In this example, we are going to use the root as the password.

Let's first create a table in the MySQL database, but before creating a table, we need to create a database first.


On this page of the site you can watch the video online Java JDBC Overview Installing MySQL Database with a duration of hours minute second in good quality, which was uploaded by the user Easy Learning 12 December 2019, share the link with friends and acquaintances, this video has already been watched 751 times on youtube and it was liked by 13 viewers. Enjoy your viewing!