• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can't connect to MySql database - No suitable driver found  RSS feed

 
Ranch Hand
Posts: 116
1
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm using the sql20 class to do some simple database stuff. It seems nice and simple so I decided to give it a go. Here is a simple class I created with sql2o and when I call the method to update the table, I get this error from the compiler:

Could not acquire a connection from DataSource - No suitable driver found for jdbc:mysql://localhost:3306/Downloads

I can connect to the database just fine with MySql Workbench as well as execute SELECT and UPDATE queries. The problem is strictly with sql2o

Any ideas?

Thank you!


 
Rancher
Posts: 3348
38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you got a MySQL JDBC driver jar file on your runtime path?
That looks like the Connector/J  connection string.
 
Michael D Sims
Ranch Hand
Posts: 116
1
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Dave Tolls wrote:Have you got a MySQL JDBC driver jar file on your runtime path?
That looks like the Connector/J  connection string.


I just figured that out ... didn't have it in my classpath and apparently had a brainfart ... ID10T error

Thank you
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!