且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MySQL错误#1133-在用户表中找不到任何匹配的行

更新时间:2023-01-12 21:28:00

事实证明,错误确实非常模糊!

It turns out, the error is very vague indeed!

1)以root身份登录时正在设置密码,因为它正在更新MySql下users表中的user/password字段.

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.

解决方案:

以下值更改为 config.inc.php 中的 false .

Change following value to false in the config.inc.php.

$cfg['Servers'][$i]['AllowNoPassword'] = true;

以使其读取

$cfg['Servers'][$i]['AllowNoPassword'] = false;

用户的主机 Any % 更改为 localhost 在MySql用户表中.这可以通过 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.