ERROR 1396 (HY000): Operation CREATE USER failed for 'root'@'localhost'

安装ranger时MySQL报错,查看MySQL数据库,发现host=localhost这一列被删除了,插入这一列就好了,具体操作如下:

解决办法:

进入MySQL数据库

1 use mysql:
2 insert into user(Host,User,Password) values("localhost","%",password("123456"))
3 GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '123456' WITH GRANT OPTION;
4 flush privileges;

 

 然后重新执行etup.sh 就正常了。

posted @ 2017-09-14 14:35  RoyFans  阅读(9813)  评论(0编辑  收藏  举报