安装CDH,HDP,CDP遇到的坑大全,不定期维护更新。。。。。。

1.在mysql中创建cm库,遇到 Access denied for user ‘root’@'hadoop101

解决办法:
修改MySQL中root用户的密码并打开远程连接,具体如下:
mysql>use mysql;
mysql>desc user;
mysql>GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "123456";  //为root添加远程连接的能力,123456是密码
mysql>update user set Password = password('123456') where User='root';
mysql>select Host,User,Password  from user where User='root'; 
mysql>flush privileges;  //刷新权限
mysql>exit

紧接着可能出现第二个坑:Your password has expired. To log in you must change it using a client that supports expired passwords.

我们先跳过授权表的方式启动数据库,强行免密登录数据库
mysqld_safe --user=mysql--datadir=/data/mysql --skip-grant-tables --skip-networking &
然后我们修改用户密码过期策略为N:
update user set password_expired="N" where user="root"; 
最后在刷新,重启
flush privileges;
service mysql restart
```
已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页