已解决idea连接数据库异常:Exception in thread “main“ com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
生活随笔
收集整理的這篇文章主要介紹了
已解决idea连接数据库异常:Exception in thread “main“ com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
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出現(xiàn)這個(gè)異常大概有兩個(gè)原因:
1.仔細(xì)查看自己的sql語(yǔ)句寫(xiě)錯(cuò)了沒(méi),可以把sql語(yǔ)句放到電腦安裝數(shù)據(jù)庫(kù)軟件中去試試,沒(méi)問(wèn)題的話就是2.的問(wèn)題;
2.就是mysql和jdbc的jar包版本不一致,比如說(shuō)mysql是8的版本,而jar是5幾的版本;
愿你們能完美解決!
總結(jié)
以上是生活随笔為你收集整理的已解决idea连接数据库异常:Exception in thread “main“ com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: [dpdk]rte_mempool_op
- 下一篇: Redis 大数据量(百亿级)Key存储