ERROR 1133 (42000): Can't find any matching row in the user table

当执行下面的命令时出现上述error

MariaDB [(none)]> grant all privileges on hive_meta.* to 'xiaoqiu'@'%';
ERROR 1133 (42000): Can't find any matching row in the user table

resolution:

发现出错的原因是我开始更改了user表的host

update user set host ='%' where user='xiaoqiu';

重新创建了数据库hive_meta之后,指定用户xiaoqiu之前需要刷新用户权限表

flush privileges;

然后重新执行上述命令就没问题了

MariaDB [(none)]> grant all privileges on hive_meta.* to 'xiaoqiu'@'%';
Query OK, 0 rows affected (0.00 sec)

修改了用户表中的任何一个字段都需要更新权限,一定要记得!!!!

欢迎关注我的公众号:小秋的博客 CSDN博客:https://blog.csdn.net/xiaoqiu_cr github:https://github.com/crr121 联系邮箱:rongchen633@gmail.com 有什么问题可以给我留言噢~
原文地址:https://www.cnblogs.com/flyingcr/p/10326869.html