Java program and mySQL connectivity issue: No suitable driver found

后端 未结 4 1429
忘掉有多难
忘掉有多难 2021-01-23 04:01

I\'ve been having a problem with mySQL database connectivity. I\'m getting an error:

No suitable driver found for jdbc:mysql://127.0.0.1/sakila.

4条回答
  •  终归单人心
    2021-01-23 04:34

    You need to add the MySQL connecter library jar file to the classpath, rather than the directory where it is contained.

    Are you not using an IDE like Netbeans or Eclipse? Setting up a command line development environment in Windows is not hard but it's not trivial either

提交回复
热议问题