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

你可能感兴趣的文章
PHP-算法-最少比较次数获取最大值最小值
查看>>
php-约瑟夫问题
查看>>
Redis从库不能同步报Can’t save in background: fork: Cannot allocate memory错误
查看>>
Redis从入门到精通|干货篇
查看>>
php.ini maxfileuploads,细说PHP高洛峰文件上传类源文件
查看>>
php.ini中常见的配置信息选项
查看>>
php.ini配置中有10处设置不当,会使网站存在安全问题
查看>>
php/jsp/asp的区别
查看>>
php20个主流框架
查看>>
php301到https,虚拟主机设置自动301跳转到HTTPS
查看>>
php5 apache 配置
查看>>
php5 升级 php7 版本遇到的问题处理方法总结
查看>>
PHP5.3.3安装Mcrypt扩展
查看>>
PHP5.4 + IIS + Win2008 R2 配置
查看>>
PHP5.4 pfsocketopen函数判断sock是否存活的bug(由memcached引起)
查看>>
Redis从入门到精通
查看>>
PHP5.6.x编译报错:Don't know how to define struct flock on this system, set --enable-opcache=no
查看>>
php5ts.dll 下载_php5ts.dll下载
查看>>
php7
查看>>
PHP7 新特性
查看>>