cdh内置postgres数据库修改hive用户密码

本文档详细介绍了如何在Cloudera Manager中配置和使用PostgreSQL数据库,包括查找数据库账户信息、更改密码以及在Cloudera Manager Admin Console中更新配置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

https://www.cloudera.com/documentation/enterprise/5-7-x/topics/cm_ig_embed_pstgrs.html#cmig_topic_5_7__section_h53_tdk_bm

To find information about the PostgreSQL database account that the Cloudera Manager Server uses, read the 

/etc/cloudera-scm-server/db.properties file:

# cat /etc/cloudera-scm-server/db.properties

Auto-generated by scm_prepare_database.sh
#
Sat Oct 1 12:19:15 PDT 201
#
com.cloudera.cmf.db.type=postgresql
com.cloudera.cmf.db.host=localhost:7432
com.cloudera.cmf.db.name=scm
com.cloudera.cmf.db.user=scm
com.cloudera.cmf.db.password=TXqEESuhj5

To change a password associated with an embedded PostgreSQL database account:

  1. Obtain the root password from the /var/lib/cloudera-scm-server-db/data/generated_password.txt file:
    # cat /var/lib/cloudera-scm-server-db/data/generated_password.txt
    
    MnPwGeWaip
    
    The password above was generated by /usr/share/cmf/bin/initialize_embedded_db.sh (part of the cloudera-scm-server-db package)
    and is the password for the user 'cloudera-scm' for the database in the current directory.
    
    Generated at Fri Jun 29 16:25:43 PDT 2012.
  2. On the host on which the Cloudera Manager Server is running, log into PostgreSQL as the root user:
    psql -U cloudera-scm -p 7432 -h localhost -d postgres
    Password for user cloudera-scm: MnPwGeWaip
    psql (8.4.18)
    Type "help" for help.
    
    postgres=#
  3. Determine the database and owner names:
    postgres=# \l
                                             List of databases
       Name    |    Owner     | Encoding | Collation  |   Ctype    |         Access privileges         
    -----------+--------------+----------+------------+------------+-----------------------------------
     amon      | amon         | UTF8     | en_US.UTF8 | en_US.UTF8 | 
     hive      | hive         | UTF8     | en_US.UTF8 | en_US.UTF8 | 
     nav       | nav          | UTF8     | en_US.UTF8 | en_US.UTF8 | 
     navms     | navms        | UTF8     | en_US.UTF8 | en_US.UTF8 | 
     postgres  | cloudera-scm | UTF8     | en_US.UTF8 | en_US.UTF8 | 
     rman      | rman         | UTF8     | en_US.UTF8 | en_US.UTF8 | 
     scm       | scm          | UTF8     | en_US.UTF8 | en_US.UTF8 | 
     template0 | cloudera-scm | UTF8     | en_US.UTF8 | en_US.UTF8 | =c/"cloudera-scm"
                                                                   : "cloudera-scm"=CTc/"cloudera-scm"
     template1 | cloudera-scm | UTF8     | en_US.UTF8 | en_US.UTF8 | =c/"cloudera-scm"
                                                                   : "cloudera-scm"=CTc/"cloudera-scm"
    (9 rows)
    
    
  4. Set the password for an owner using the \password command. For example, to set the password for the amon owner, do the following:
    postgres=# \password amon
    Enter new password: 
    Enter it again: 
  5. Configure the role with the new password:
    1. In the Cloudera Manager Admin Console, select Clusters > Cloudera Management Service.
    2. Click the Configuration tab.
    3. In the Scope section, select the role where you are configuring the database.
    4. Select Category > Database category.
    5. Set the Role Name Database Password property.
    6. Click Save Changes to commit the changes.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值