0

I am trying to make a database connection but when i try to get the connection from my database it gives me the error:

java.sql.SQLException: No suitable driver found for jdbc:mysql://play.zsinfo.nl:3306/daansander
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at me.daansander.login.database.MySql.getConnection(MySql.java:28)
at me.daansander.login.database.Sql.connect(Sql.java:13)
at me.daansander.login.Login.main(Login.java:11)

i looked into the code and i found the line where the problem is:

connection = DriverManager.getConnection("jdbc:mysql://" + host + ":" + port + "/" + db, user, pass);

but i could not find the problem i tried this on other plugins and it works just fine

Daan Meijer
  • 143
  • 2
  • 12

1 Answers1

0

It clearly says that your class can not find the correct mysql connector library file. you can make sure it by writing a simple JDBC client class and run it on command line by specifying the path to your library.

you can find more from this POST and it will show you how to check the configuration properly. hope it will guide you!

Community
  • 1
  • 1
Nomesh DeSilva
  • 1,649
  • 4
  • 25
  • 43