假设 在上一段的程序中 ,已经将temp="jdbc:mysql://localhost:3306/mylibrary"
在接下来的连接mysql中,直接写
conn = DriverManager.getConnection(temp,"root", "123456");
为何连接补上,出现错误
Error : java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at trysearch.main(trysearch.java:88)
是url不支持参数传递吗?help~~