且构网

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

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

更新时间:2023-01-12 21:19:43

事实证明,错误确实很模糊!

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.

解决方案:

以下值更改为 falseconfig.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.