hello i have mysql running on my mac and i am trying to write a java script to connect to it:
private static final String USERNAME = "root";
private static final String PASSWORD = "password";
private static final String CONN_STRING = "jdbc:mysql://local:3306/test";
public static void main(String[] args) {
Connection conn = null;
try {
conn = DriverManager.getConnection(CONN_STRING,USERNAME,PASSWORD);
System.out.println("Connected");
}catch (SQLException e){
System.err.println(e);
}
}
however i keep getting this error message
java.sql.SQLException: No suitable driver found for jdbc:mysql://local:3306/test
what am i doing wrong?