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.


Watch video Java JDBC Overview Installing MySQL Database online without registration, duration hours minute second in high quality. This video was added by user Easy Learning 12 December 2019, don't forget to share it with your friends and acquaintances, it has been viewed on our site 751 once and liked it 13 people.