java.sql.SQLException::No suitable driver

이전:

 val conn= DriverManager.getConnection("jdbc:mysql://ip주소/데이터베이스이름","sql 권한 받은 아이디","sql 비밀번호")

해결

  Class.forName("com.mysql.jdbc.Driver")
  val conn= DriverManager.getConnection("jdbc:mysql://ip주소/데이터베이스이름","sql 권한 받은 아이디","sql 비밀번호")

참고링크:

stackoverflow.com/questions/60084064/java-sql-sqlexception-no-suitable-driver-found-for-jdbcmysql-localhost3306

 

java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/database

I've been trying to set up my own rest api for a school project. I decided to use MySQL as a database and i want to connect it with my webservice, but apparently i always get this error message: j...

stackoverflow.com

 

+ Recent posts