`
jianzong2000
  • 浏览: 54646 次
  • 性别: Icon_minigender_1
  • 来自: 南京
文章分类
社区版块
存档分类
最新评论

本机mysql连接的问题

 
阅读更多

在linux上面,hive和mysql server配置在同一台机子上面,用shell时一直报这个错误。

Access denied for user 'root'@'localhost' (using password: YES)

在window上面写个简单的java程序连接正常。。查了半天,发现users表里面有两条记录。

host                                    user     password

%                                        root      *4DF1D66463C18D44E3B001A8FB1BBFBEA13E27FC

localhost                             root       空的。

 

两个root的密码不一样的。。用命令改成一样的ok了。。

GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'root';

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics