无法从Eclipse DataSource Explorer连接到MySQl数据库

ASD*_*ASD 3 java eclipse jdbc java-ee

http://motionsharing.com/site/download/acefad55f1e81e456d71a7448b278915

无法从Eclipse DataSource Explorer连接到MySQl数据库.

我调整适当的驱动程序,但我无法连接.PS:我可以连接到derby db,我可以连接到mysql db但只能从代码连接,但是我想从Data Source Explorer连接到mysql db以获得创建表的可能性等等.

怎么了 ?

我可以通过代码连接.

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();
    }
}
Run Code Online (Sandbox Code Playgroud)

ada*_*shr 5

您需要下载 MySQL JDBC驱动程序并将其添加到设置中.

当您尝试在Datasource Explorer中创建新的连接配置文件时,您将看到这些屏幕.在最后一步中,您必须指向正确下载的JAR文件.

在此输入图像描述 在此输入图像描述 在此输入图像描述 在此输入图像描述