eclipse连接mysql数据库找不到适合的驱动
importjava.sql.*;importjava.util.*;publicclassASA{publicstaticvoidmain(String[]args)t...
import java.sql.*;
import java.util.*;
public class ASA {
public static void main(String[] args) throws Exception{
Class.forName("com.mysql.cj.jdbc.Driver");
String url="jdbc:myspl://127.0.0.1:3306/test";
Connection conn = DriverManager.getConnection(url,"root","root");
System.out.println(conn);
}
} 展开
import java.util.*;
public class ASA {
public static void main(String[] args) throws Exception{
Class.forName("com.mysql.cj.jdbc.Driver");
String url="jdbc:myspl://127.0.0.1:3306/test";
Connection conn = DriverManager.getConnection(url,"root","root");
System.out.println(conn);
}
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询