The error:
No suitable driver found for jdbc:mysql://localhost:3306
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
And here is my code.
public Connection getConnection() throws SQLException {
Connection conn;
Properties connectionProps = new Properties();
connectionProps.put("user", "root");
connectionProps.put("password", "pass");
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/" , connectionProps);
System.out.println("Connected to database");
return conn;
}