已解决idea连接数据库异常:Exception in thread “main“ com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
生活随笔
收集整理的這篇文章主要介紹了
已解决idea连接数据库异常:Exception in thread “main“ com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Exception in thread “main” com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
Exception in thread "main" 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出現這個異常大概有兩個原因:
1.仔細查看自己的sql語句寫錯了沒,可以把sql語句放到電腦安裝數據庫軟件中去試試,沒問題的話就是2.的問題;
2.就是mysql和jdbc的jar包版本不一致,比如說mysql是8的版本,而jar是5幾的版本;
愿你們能完美解決!
總結
以上是生活随笔為你收集整理的已解决idea连接数据库异常:Exception in thread “main“ com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: [dpdk]rte_mempool_op
- 下一篇: 什么是蛋白质组学?