博客
关于我
VCSA5.x数据库密码更改
阅读量:597 次
发布时间:2019-03-12

本文共 1092 字,大约阅读时间需要 3 分钟。

背景

VCSA(vCenter Server Appliance)的数据库密码经常被长期忽视或仅定期修改。如果密码丢失或忘记,必需及时更改以恢复数据库访问权限。


操作指南

对于VCSA(vCenter Server Appliance)数据库密码更改,您需要遵循以下步骤:


1. 更改嵌入式数据库密码

方法一:通过SSH访问并编辑数据库配置文件

1.Using SSH连接到vCenter Server Appliance。2.Open the /etc/vmware-vpx/embedded_db.cfg 文件进行编辑。3.Finder数据库密码行(.search for EMB_DB_'PASSWORD'),更新单引号之间的密码值。

方法二:通过数据库配置文件更改密码

1.打开 /etc/vmware-vpx/vcdb.properties 文件进行编辑。2.更新数据库密码配置。


2. 更改vc和postgres数据库用户密码

方法一:通过SQL命令更改密码

1.Using SQL命令连接到vPostgres数据库:

/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres

2.执行以下SQL命令,更改vc和postgres用户的密码:

ALTER USER postgres WITH PASSWORD 'new-password';ALTER USER vc WITH PASSWORD 'new-password';

3.退出数据库时,输入 \q 退出。

方法二:更新Postgres/.pgpass文件

1.编辑 /root/.pgpass 文件:

vi /root/.pgpass

2.在文件末尾添加以下条目:

  • localhost:5432:VCDB:postgres:new-password
  • localhost:5432:postgres:postgres:new-password
  • localhost:5432:VCDB:vc:new-password

3. 更改Postgres数据库密码

方法一:通过命令更改Postgres密码

1.更改vPostgres数据库密码:

passwd postgres

2.更新vpxd.cfg文件中的加密密码:

/usr/sbin/vpxd -p

3.重新启动vpxd服务:

/etc/init.d/vmware-vpxd restart

以上步骤仅适用于已知道数据库访问权限的情况。如果您忘记了数据库访问信息,建议先按照硬件访问流程重新获得管理员权限。

转载地址:http://pcwxz.baihongyu.com/

你可能感兴趣的文章
npm如何清空缓存并重新打包?
查看>>
npm学习(十一)之package-lock.json
查看>>
npm安装 出现 npm ERR! code ETIMEDOUT npm ERR! syscall connect npm ERR! errno ETIMEDOUT npm ERR! 解决方法
查看>>
npm安装crypto-js 如何安装crypto-js, python爬虫安装加解密插件 找不到模块crypto-js python报错解决丢失crypto-js模块
查看>>
npm安装教程
查看>>
npm报错Cannot find module ‘webpack‘ Require stack
查看>>
npm报错Failed at the node-sass@4.14.1 postinstall script
查看>>
npm报错fatal: Could not read from remote repository
查看>>
npm报错File to import not found or unreadable: @/assets/styles/global.scss.
查看>>
npm报错TypeError: this.getOptions is not a function
查看>>
npm报错unable to access ‘https://github.com/sohee-lee7/Squire.git/‘
查看>>
npm淘宝镜像过期npm ERR! request to https://registry.npm.taobao.org/vuex failed, reason: certificate has ex
查看>>
npm版本过高问题
查看>>
npm的“--force“和“--legacy-peer-deps“参数
查看>>
npm的安装和更新---npm工作笔记002
查看>>
npm的常用操作---npm工作笔记003
查看>>
npm的常用配置项---npm工作笔记004
查看>>
npm的问题:config global `--global`, `--local` are deprecated. Use `--location=global` instead 的解决办法
查看>>
npm编译报错You may need an additional loader to handle the result of these loaders
查看>>
npm设置淘宝镜像、升级等
查看>>