将 Java 连接到 MySQL 数据库
如何在Java中连接到MySQL数据库?
当我尝试时,我会得到
java.sql.SQLException: No suitable driver found for jdbc:mysql://database/table
at java.sql.DriverManager.getConnection(DriverManager.java:689)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
或
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
或
java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver