#JDBC

Опубликовано: 11 Март 2026
на канале: Tech Educators
773
22

How to Connect MySQL Database in JAVA? || JAVA JDBC connectivity to MySQL in very easy steps.

In this video I going to show you how to connect a JAVA application with MySQL database and fetch the data. I will show you method which will work on all the version of JAVA.

You can download mysql-connector.jar file by using following link:
https://goo.gl/ftjWmK

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 information for the MySQL database:

1) Driver class: The driver class for the MySQL database is com.mysql.jdbc.Driver.
2) Connection URL: The connection URL for the MySQL database is jdbc:mysql://localhost:3306/test 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 test is the database name. We may use any database, in such case, you need to replace the test with your database name.
3) Username: The default username for the MySQL database is root.
4) Password: The default password for the MySQL database is ""(blank).Password is given by the user at the time of installing the MySQL database.

Video credit: Mr. Loknath

Do Like share comment and subscribe my channel.