博客
关于我
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/

你可能感兴趣的文章
No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc
查看>>
No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
查看>>
No mapping found for HTTP request with URI [/logout.do] in DispatcherServlet with name 'springmvc'
查看>>
No module named 'crispy_forms'等使用pycharm开发
查看>>
No module named cv2
查看>>
No module named tensorboard.main在安装tensorboardX的时候遇到的问题
查看>>
No module named ‘MySQLdb‘错误解决No module named ‘MySQLdb‘错误解决
查看>>
No new migrations found. Your system is up-to-date.
查看>>
No qualifying bean of type XXX found for dependency XXX.
查看>>
No qualifying bean of type ‘com.netflix.discovery.AbstractDiscoveryClientOptionalArgs<?>‘ available
查看>>
No resource identifier found for attribute 'srcCompat' in package的解决办法
查看>>
no session found for current thread
查看>>
No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android
查看>>
NO.23 ZenTaoPHP目录结构
查看>>
no1
查看>>
NO32 网络层次及OSI7层模型--TCP三次握手四次断开--子网划分
查看>>
NOAA(美国海洋和大气管理局)气象数据获取与POI点数据获取
查看>>
NoClassDefFoundError: org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadata
查看>>
node exporter完整版
查看>>
Node JS: < 一> 初识Node JS
查看>>