无法为使用 3.5.2.2 - phpMyAdmin for 5.5.27 - MySQL 的用户设置密码。以用户身份登录 phpMyAdmin
尝试设置密码时,会弹出以下错误:
#1133 - Can't find any matching row in the user table
以root登录时,弹出以下密码设置成功消息。
SET PASSWORD FOR 'user'@'%' = PASSWORD( '***' )
在任何一种情况下,密码都不会设置并保持当前状态,空白。
最佳答案
我在不同的上下文中(不在 phpMyAdmin 中)使用 MySQL 时遇到了这个错误。 GRANT 和 SET PASSWORD 命令在 mysql.user 表中列出的特定现有用户上失败。就我而言,它是通过运行修复的
FLUSH PRIVILEGES;
documentation因为这个命令说
Reloads the privileges from the grant tables in the mysql database.
The server caches information in memory as a result of GRANT and CREATE USER statements. This memory is not released by the corresponding REVOKE and DROP USER statements, so for a server that executes many instances of the statements that cause caching, there will be an increase in memory use. This cached memory can be freed with FLUSH PRIVILEGES.
显然用户表缓存已达到不一致的状态,导致出现此奇怪的错误消息。更多信息可用here .
关于MySQL 错误 #1133 - 在用户表中找不到任何匹配的行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12877458/