0

I tried connect mysql in java but there is compiler error.

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

I added mysql libraray but this is defective : Class.forName("com.mysql.jdbc.Driver");

What should I do?

Mike Lischke
  • 48,925
  • 16
  • 119
  • 181

1 Answers1

1

MySQLSyntaxErrorException means that you are already connected to MySQL but you have some problems with your SQL script, that you're trying to execute.

Buhake Sindi
  • 87,898
  • 29
  • 167
  • 228
Natalia
  • 4,362
  • 24
  • 25