I am trying to learn how to use mysql databases with java. In my searches for knowledge I came across this piece of code from : https://www.javatpoint.com/java-drivermanager-registerdriver-method
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.SQLException;
public class JavaDriverManagerExample1 {
public static void main(String args[]) throws SQLException {
Driver d=new com.mysql.jdbc.Driver();
DriverManager.registerDriver(d);
System.out.println("Driver successfully registered !");
}
}
the problem is that I get a compilation error: com.mysql cannot be resolved to a type.
I tried to install jdbc for ubuntu but for no avail.
I would appreciate any sort of help in this issue. Thank you!