package net.codejava;
import java.sql.*;
class MysqlCon{
public static void updateInDB(String num1)
{
try{
Class.forName("jdbc:mysql://localhost:port/database");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:port/database","user","password");Statement stmt=con.createStatement();
..................
This is the code i'm using to connect to my databse . I have mysql-connector jar in the class path of my project in Intellij IDE. Have also added it in tomcat9/lib. Getting the below error