No suitable driver found for jdbc mysql?

后端 未结 6 1409
抹茶落季
抹茶落季 2020-12-03 23:28

I am trying to write a program to connect to a MySQL database in eclipse, but I get the error \"java.sql.SQLException: No suitable driver found\".

The java

6条回答
  •  无人及你
    2020-12-03 23:38

    I had the same problem. I solved it by adding:

    Class.forName("com.mysql.jdbc.Driver");
    

提交回复
热议问题