当前位置:   article > 正文

Maxwell查询databases表报错:You have an error in your SQL syntax;

Maxwell查询databases表报错:You have an error in your SQL syntax;

报错信息: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 'databases' at line 1


报错说明:

maxwell初始化后,在其数据库中会有一些表,查询其他的表都正常,但查询databases表报错;


报错原因:databases是MySQL的关键字,而为了区分MySQL的关键字与普通字符,MySQL引入了反引号来进行区分

 关键字/保留字查询:https://mysql.net.cn/doc/refman/8.0/en/keywords.html


解决方法:

查询时加上反引号即可:select * from `databases`

内容如下:

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/71820
推荐阅读
相关标签
  

闽ICP备14008679号