Запущен локальный mysql сервер.
Пытаюсь подключиться нему:
public class UserEntityManager {
public static void add(UserEntity user) throws SQLException {
Connection connection = DriverManager.getConnection("jdbc:mysql//localhost/javadb", "root", "");
String sql = "INSERT INTO users(login, password, age, job) VALUES(?, ?, ?, ?)";
//Statement s = connection.createStatement();
//s.executeUpdate(sql);
PreparedStatement ps = connection.prepareStatement(sql);
ps.setString(1, user.getLogin());
ps.setString(2, user.getPassword());
ps.setInt(3, user.getAge());
ps.setString(4, user.getJob());
ps.executeUpdate();
}
}
Выдает ошибку:
java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost/javadb
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:702)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228)
at org.company.app.database.manager.UserEntityManager.add(UserEntityManager.java:11)
at org.company.app.Main.main(Main.java:15)
В чем дело?