http://motionsharing.com/site/download/acefad55f1e81e456d71a7448b278915
Cannot connect to MySQl database from Eclipse DataSource Explorer.
I tune appropriate driver but I cannot to connect. P.S.: I can connect to derby db and I can connect to mysql db but only from code, but I want to connect to mysql db from Data Source Explorer to get posivbilities to create tables and so on.
What is wrong ?
I can connect through code.
public static void main(String args[]) {
try {
Class.forName("com.mysql.jdbc.Driver");
System.out.println("Driver loading success!");
String url = "jdbc:mysql://localhost:3306/mydb";
String name = "root";
String password = "root";
try {
Connection con = DriverManager.getConnection(url, name, password);
System.out.println("Connected.");
con.close();
System.out.println("Disconnected.");
} catch (SQLException e) {
e.printStackTrace();
}
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
You need to download MySQL JDBC driver and add it to the settings.
You will see these screens when you try to create a new connection profile in Datasource Explorer. In the last step, you'll have to point to the right downloaded JAR file.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With