0

我尝试在 java 中连接 mysql,但出现编译器错误。

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

我添加了 mysql libraray,但这是有缺陷的:Class.forName("com.mysql.jdbc.Driver");

我应该怎么办?

4

1 回答 1

1

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

于 2013-07-08T12:51:27.010 回答