#1142 - SELECT 命令拒绝用户 ''@'localhost' 表 'pma_table_uiprefs'

2022-01-05 00:00:00 mysql phpmyadmin

希望有人能帮助我,因为我在网上查询过这个错误,但没有成功或没有具体答案.我正在使用 Windows 和 Xampp.这是我最近将数据库导入 phpmyadmin 后遇到的错误...

Hopefully someone can help me, for I have queried the web with no success or concrete answer to this error. I’m using Windows and Xampp. Here is the error I am getting after I have recently imported the database into phpmyadmin…

#1142 - SELECT command denied to user ''@'localhost' for table 'pma_table_uiprefs'

导入数据库后,phpmyadmin 中一切正常,直到我注销然后重新登录,这就是问题所在.当我单击导入数据库中的任何表时,出现以下错误...

After I import the database, everything is fine in phpmyadmin until I log out and then log back in, this is where the problem lies. When I click on any of the tables from the imported database, I get the following errors…

SELECT 'prefs'
FROM 'phpmyadmin'.'pma_table_uiprefs'
WEHRE 'username' = 'root'
AND 'db_name' = 'afdb'
AND 'table_name' = 'role'

#1142 - SELECT command denied to user ''@'localhost' for table 'pma_table_uiprefs'

再次感谢您花时间阅读我的帖子,希望有人能帮助我解决这个错误.

Thank you again for taking time to read my post and hopefully someone can help me with this error.

推荐答案

我偶然发现了这个问题,我解决了它只需注销 phpMyAdmin 并重新登录.

I stumble upon this issue and I solved it just by logging out of phpMyAdmin and in again.

看一下错误信息查询:

SELECT command denied to user ''@'localhost' for table 'pma_table_uiprefs'

发生这种情况是因为 MySQL 拒绝访问服务器 localhost 上的用户"(空白).默认设置是阻止来自匿名用户的所有请求.

This happens due to MySQL denying access to user "" (blank) at server localhost. The default setting is to block all requests from anonymous users.

通过注销,我们强制 phpMyAdmin忘记"当前用户并让我们输入 MySQL 服务器的登录凭据.

By logging out we force phpMyAdmin to "forget" the current user and let us input the login credentials for the MySQL server.

相关文章