当前位置: 代码迷 >> 综合 >> MySQL 数据库show processlist where条件筛选报错解决方法,[Code: 1064, SQL State: 42000] You have an error in your
  详细解决方案

MySQL 数据库show processlist where条件筛选报错解决方法,[Code: 1064, SQL State: 42000] You have an error in your

热度:7   发布时间:2023-12-12 05:48:55.0
-- 筛选报错
show processlist where user = 'root';
-- 筛选可用
select * from information_schema.processlist where user = 'root';

报错信息如下:
据说是因为 bug,官方还专门声明过。
[Code: 1064, SQL State: 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 'where user = 'root'' at line 1
show processlistselect * from information_schema.processlist 的查询结果是一样的,用后面的方法查询就好了。
运行效果图:

在这里插入图片描述
喜欢的点个赞?吧!

  相关解决方案