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

0x01 问题描述

在使用 mysql 以下命令修改用户密码的时候出现这个错误:ERROR 1133 (42000): Can’t find any matching row in the user tabl.从字面上的意思是在用户标签中找不到匹配的行;

set password for mysqlroot@localhost = password ('123456');

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

0x02 解决方法

我们登录到 mysql 查询下 mysql 用户的相关信息;

mysql -uroot -p
Enter password: ************
select Host,User from user;

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

从列出的用户信息可以看到列出的用户和 host,修改命令即可;

set password for mysqlroot@localhost = password ('123456');    # 原报错命令;
set password for mysqlroot@'%' = password ('123456');     # 修改 localhost 为 % 密码修改搞定;

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

声明:本站内容仅限用于测试、学习环境使用!在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站和媒体平台。如若本站内容侵犯了原著者的合法权益,请联系客服或发送邮件:info@xxapp.net「需要权利证明」本站将及时下架相应内容!失效反馈

给TA打赏
共{{data.count}}人
人已打赏
个人中心
购物车
优惠劵
搜索