MySQL授予所有特权未得到应用 [英] Mysql grant all privileges is not getting applied

查看:84
本文介绍了MySQL授予所有特权未得到应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发出以下命令以允许从任何主机进行root登录

I issue the following command to allow root login from any host

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'xxxx' WITH GRANT OPTION;
FLUSH PRIVILEGES;

但是它不会更新吗?



mysql> show grants;
+----------------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@localhost                                                                                                              |
+----------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*xxxxxxxxxxxxxxxxx33487256' WITH GRANT OPTION |
| GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION                                                                           |
+----------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

推荐答案

我怀疑是因为当您以root身份连接到localhost时,您正在发出"show Grants"命令.试试这个,看看返回什么:

I suspect it's because you're issuing the "show grants" command when connected as root to localhost. Try this and see what is returned:

SHOW GRANTS FOR 'root'@'%';

如果没有任何显示,请查看mysql.user表,那里可能有一个线索:

And if that doesn't show up anything, have a look in the mysql.user table, there might be a clue in there:

SELECT user, host FROM mysql.user;

这篇关于MySQL授予所有特权未得到应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆