使用ambari安装的ranger在启动ranger-admin时报错
Access denied for user ‘root’@’%’ to database ‘ranger’
参考解决办法:
使用root用户登录数据库,执行以下sql语句
mysql> SELECT host,user,password,Grant_priv,Super_priv FROM mysql.user;
+---------------------+---------------+-------------------------------------------+------------+------------+
| host | user | password | Grant_priv | Super_priv |
+---------------------+---------------+-------------------------------------------+------------+------------+
| localhost | root | *F861720E101148897B0F5239DB926E756B1C28B3 | Y | Y |
| 127.0.0.1 | root | *F861720E101148897B0F5239DB926E756B1C28B3 | Y | Y |
| ::1 | root | *F861720E101148897B0F5239DB926E756B1C28B3 | Y | Y |
| % | udp_zjf | *65B3DBD1FB20F71CED8E1359A2F303B2AF41DF3A | N | N |
| bgs-8p113-yangliang | ambari | *2C0870382CE134C9AF846C9D51709C26435A50E9 | N | N |
| % | swordfish_zjf | *C68242E5CCE1D6ECEADEBF782C31A20D107CA846 | N | N |
| % | swordfish | *FC48AB2E7C214BC45A9E6B66C46016F8A53E5A28 | N | N |
| localhost | swordfish_zjf | *C68242E5CCE1D6ECEADEBF782C31A20D107CA846 | N | N |
| localhost | swordfish | *FC48AB2E7C214BC45A9E6B66C46016F8A53E5A28 | N | N |
| % | swordfish_li | *D97737CF5AAB07222042BA796B0B7E08ACCE0D43 | N | N |
| localhost | swordfish_li | *D97737CF5AAB07222042BA796B0B7E08ACCE0D43 | N | N |
| % | root | *F861720E101148897B0F5239DB926E756B1C28B3 | N |