码迷,mamicode.com
首页 > 数据库 > 详细

Error Code: 1044. Access denied for user 'root'@'%' to database

时间:2019-04-29 19:17:26      阅读:395      评论:0      收藏:0      [点我收藏+]

标签:for   ase   localhost   style   oozie   授权   登录   error   color   

mysql> SELECT host,user,password,Grant_priv,Super_priv FROM mysql.user;
+--------------+---------+-------------------------------------------+------------+------------+
| host         | user    | password                                  | Grant_priv | Super_priv |
+--------------+---------+-------------------------------------------+------------+------------+
| 192.168.28.% | oozie   | *FED29C14B2E900D70B11B1F1B370F953BA51A6A0 | N          | Y          |
| 192.168.28.% | hive    | *FED29C14B2E900D70B11B1F1B370F953BA51A6A0 | N          | Y          |
| 192.168.28.% | root    | *FED29C14B2E900D70B11B1F1B370F953BA51A6A0 | Y          | Y          |
| localhost    | ranger  | *84BB87F6BF7F61703B24CE1C9AA9C0E3F2286900 | N          | N          |
| localhost    | root    | 0                                         | Y          | Y          |
| %            | root    | *FED29C14B2E900D70B11B1F1B370F953BA51A6A0 | N          | Y          |
| 127.0.0.1    | root    | *FED29C14B2E900D70B11B1F1B370F953BA51A6A0 | Y          | Y          |
| %            | ranger  | *84BB87F6BF7F61703B24CE1C9AA9C0E3F2286900 | N          | Y          |
+--------------+---------+-------------------------------------------+------------+------------+
可以看到授权的权限没有打开: Grant_priv is set to N for root@%. 修复下

UPDATE mysql.user SET Grant_priv=Y, Super_priv=Y WHERE User=root; FLUSH PRIVILEGES;

重新登录下,就ok了。

Error Code: 1044. Access denied for user 'root'@'%' to database

标签:for   ase   localhost   style   oozie   授权   登录   error   color   

原文地址:https://www.cnblogs.com/felixzh/p/10792082.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!