MySQL : Java Database Connectivity

Java Database Connectivity (JDBC) refers to a Java API (Application Program Interface) that facilitates communication between Java and a database. JDBC is a general term for a variety of databases. In this tutorial, we'll learn how to establish connectivity between Java and MySQL, so that we can perform the CRUD operations on our database using a java program. Prerequisites : MySQL must be installed. If not, you can get it here . (Remember the password you provided for root user.) Download mysql jar file from here . Unzip the contents and copy mysql-connector-java-8.0.21 file and paste in a folder(C:\mysqlJar on my machine) and remember to include it in classpath while running our java program. Getting started with MySQL : Open command prompt , in that type mysql -uroot -p{ Enter the password for root user } This command will open the MySQL prompt. Now let's see the basic commands. To create database : create database jdbcDB; To create user : create user 'jdbcuse...