MySQL 错误 #1133 - 在用户表中找不到任何匹配的行
无法为使用 3.5.2.2 - phpMyAdmin for 5.5.27 - MySQL 的用户设置密码.在以用户身份登录 phpMyAdmin
时尝试设置密码时,弹出以下错误:
Unable to set password for a user using 3.5.2.2 - phpMyAdmin for 5.5.27 - MySQL. When trying to set the password while logged onto phpMyAdmin
as the user, it pops up the following error:
#1133 - Can't find any matching row in the user table
以 root 身份登录时,弹出以下密码设置成功消息.
When logged on as root, following password set successfully message pops up.
SET PASSWORD FOR 'user'@'%' = PASSWORD( '***' )
在任何一种情况下,密码都不会设置并保持当前状态,空白.
In either case, password does not set and stays as it currently is, blank.
推荐答案
事实证明,错误确实很模糊!
It turns out, the error is very vague indeed!
1) 以 root 身份登录时设置密码,因为它正在更新 MySql 下用户表中的用户/密码字段.
1) Password was setting while logged on as root, as it was updating the user/password field in the users table under MySql.
2)当以用户身份登录时,密码实际上并没有改变,即使在MySql中的users表中指定了一个,config.inc.php文件允许无需密码进行身份验证.
2) When logged on as user, password was in fact not changing and even though there was one specified in the users table in MySql, config.inc.php file allowed authentication without password.
解决方案:
将以下值更改为 false
在 config.inc.php 中.
$cfg['Servers'][$i]['AllowNoPassword'] = true;
以便读取
$cfg['Servers'][$i]['AllowNoPassword'] = false;
更改用户的主机从Any
或%
到 MySql 用户表中的 localhost
.这可以通过 phpMyAdmin 控制台轻松实现.
Change user's host from Any
or %
to localhost
in MySql users table. This could easily be achieved via phpMyAdmin console.
这两个更改使我可以使用密码进行用户身份验证,而不允许没有密码的身份验证.
These two changes allowed me to authenticate as user with it's password and disallowed authentication without password.
它还允许用户在以用户身份登录时更改其密码.
It also allowed user to change its password while logged on as user.
似乎所有权限都已通过这两个更改修复.
Seems all permissions and the rest was fixed with these two changes.
相关文章