安装cloudera manager使用mysql作为元数据库
1.首次安装好mysql数据库后,会生成一个随机密码,使用如下办法找到:
cat /var/log/mysqld.log |grep password
2.首次安装好mysql数据库后,第一次登陆进去,需要先修改root用户密码:
grant all privileges on *.* to 'root'@'%' identified by 'xxxxxxxxx';
grant all privileges on *.* to 'root'@'localhost' identified by 'xxxxxxxxx';
flush privileges;
set password for root@localhost = password('xxxxxxxxx');
update user set password=password("xxxxxxxxx") where user="root";
flush privileges;
3.cloudera manager数据库迁移mysql数据库备份:
备份所有数据库,包括hive,oozie,hue,sentry
mysqldump -u root -p -A > oldmysql.dump
单独备份某个数据库,例如hive
mysqldump -u root -p --database hive > hive.sql
恢复数据库:
mysql -u root -p < oldmysql.dump