在為用戶指定數(shù)據(jù)的時候,報錯了,SQL 錯誤 [1064] [42000]: You have an error in your SQL syntax; check the manual that corresponds to yo
GRANT ALL PRIVILEGES ON jeecg-boot.* TO 'jeecgoot'@'%';
ERROR 1064 (42000): 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 '-boot' at line 1
原因
出現(xiàn)這個錯誤是因為數(shù)據(jù)庫名稱 jeecg-boot 包含了不允許的字符(如連字符-)。根據(jù) MySQL 文檔,數(shù)據(jù)庫名、表名和列名等標識符應(yīng)該只包含字母、數(shù)字、下劃線、美元符號和 Unicode 字符。在這種情況下,您可以使用反引號(`)將數(shù)據(jù)庫名括起來,以便正確解析。文章來源:http://www.zghlxwxcb.cn/news/detail-853970.html
解決方式:把數(shù)據(jù)庫名 反引號? 引起來`jeecg-boot`就可以了文章來源地址http://www.zghlxwxcb.cn/news/detail-853970.html
GRANT ALL PRIVILEGES ON `jeecg-boot`.* TO 'jeecgoot'@'%';
到了這里,關(guān)于SQL 錯誤 [1064] [42000]: You have an error in your SQL syntax; check the manual that corresponds to yo的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!