简体   繁体   中英

Java mysql connection is error

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?

MySQLSyntaxErrorException意味着您已经连接到MySQL,但是您尝试执行的SQL脚本有一些问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM