簡體   English   中英

Java mysql連接錯誤

[英]Java mysql connection is error

我嘗試在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");

我該怎么辦?

MySQLSyntaxErrorException意味着您已經連接到MySQL,但是您嘗試執行的SQL腳本有一些問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM