当前位置:网站首页>HAC集群修改管理员用户密码
HAC集群修改管理员用户密码
2022-07-05 18:55:00 【51CTO】
瀚高数据库
目录
环境
文档用途
详细信息
环境
系统平台:Linux x86-64 Red Hat Enterprise Linux 7
版本:4.5.6,4.5.7
文档用途
本文档用于指导HAC集群修改管理员用户密码
详细信息
1、检查集群状态,使用A、B两种方法进行判断
方法A:使用集群命令,确保TL时间线一致,Lag in MB数据同步延迟不能过高,最好延迟为0。
[
root
@localhost
~]
#
hghactl
list
+
Cluster:
ha (
7072256965608815760)
-------+---------+----+-----------+
|
Member
|
Host
|
Role
|
State
|
TL
|
Lag
in
MB
|
+----------+---------------------+---------+---------+----+-----------+
|
hghac228
|
192.168.80.228:
5866
|
Leader
|
running
|
6
|
|
|
hghac230
|
192.168.80.230:
5866
|
Replica
|
running
|
6
|
0
|
+----------+---------------------+---------+---------+----+-----------+
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
方法B:各个节点查询进程,有sender节点的是主库,有receiver节点的是备库
2、暂停集群
(任意节点执行即可,暂停集群只是停止集群主备切换,不影响数据库使用)


3、修改密码(只能在主库执行)
4、主备库修改密码文件
冒号为分隔符,倒数第二位用户名,最后一位数据库密码,将密码修改为修改之后的密码即可,保存退出。
5、主备库修改集群配置文件
vim
/
opt
/
HighGo
/
tools
/
hghac
/
hghac.
yaml
authentication:
replication:
password:
Hello
@123
username:
sysdba
rewind:
password:
Hello
@123
username:
sysdba
sysdba:
password:
Hello
@123
syssso:
password:
Hello
@123
syssao:
password:
Hello
@123
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
根据对应的用户名修改密码即可,保存退出。
6、备库修改data目录下的postgresql.auto.conf文件
vim
$PGDATA
/
postgresql.
auto.
conf
primary_conninfo
=
'user=sysdba password='
'[email protected]'
' host=192.168.80.228 port=5866 sslmode=prefer sslcompression=0 gssencmode=disable krbsrvname=postgres target_session_attrs=any'
- 1.
- 2.
- 3.
注意:password前边的user为sysdba,即修改用户sysdba的密码
7、恢复集群(任意节点执行即可)


8、重启集群生效(任意节点执行即可)


注意:
最后一个参数c是集群的名字,查看方法
9、查看集群状态


10、重新初始化所有节点的hgproxy
(如果没有使用hgproxy请跳过该步骤)
11、其他
执行hghactl等集群命令提示“未找到命令”,请配置环境变量,参考如下:
vim
~
/.
bash_profile
export
PGPORT
=
5866
export
PGUSER
=
sysdba
export
PGDATABASE
=
highgo
export
PGHOME
=/
opt
/
HighGo4
.5
.7
-
see
export
PGDATA
=/
opt
/
HighGo4
.5
.7
-
see
/
data
export
PATH
=
$PGHOME
/
bin:
$PATH:
$HOME
/
bin:
/
opt
/
HighGo
/
tools
/
hgproxy
/
bin:
/
opt
/
HighGo
/
tools
/
hghac:
/
opt
/
HighGo
/
tools
/
hghac
/
etcd
export
LD_LIBRARY_PATH
=
$PGHOME
/
lib:
/
usr
/
lib64:
$LD_LIBRARY_PATH
export
ETCDCTL_ENDPOINTS
=
http:
//10.1.194.182:2379,http://10.1.194.191:2379,http://10.1.194.192:2379
export
PATRONICTL_CONFIG_FILE
=/
opt
/
HighGo
/
tools
/
hghac
/
hghac
-
see.
yaml
source
~
/.
bash_profile
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
注意:
1、需要根据实际情况修改环境变量实际路径,可以使用find命令查找文件路径
例:查找hghac find / -iname hghac -print
2、ETCDCTL_ENDPOINTS三个ip需要修改为配置etcd三节点的ip,可以参考/opt/HighGo/tools/hghac/hghac-see.yaml文件中的etcd:hosts
边栏推荐
- Summary of six points of MySQL optimization
- The worse the AI performance, the higher the bonus? Doctor of New York University offered a reward for the task of making the big model perform poorly
- Precautions for RTD temperature measurement of max31865 module
- 华律网牵手观测云,上线系统全链路可观测平台
- Startup and shutdown of CDB instances
- #夏日挑战赛#数据库学霸笔记,考试/面试快速复习~
- Interviewer: what is the difference between redis expiration deletion strategy and memory obsolescence strategy?
- UDF implementation of Dameng database
- How to write good code defensive programming
- ROS installation error sudo: rosdep: command not found
猜你喜欢

Go语言 | 03 数组、指针、切片用法

小程序 修改样式 ( placeholder、checkbox的样式)

How to write good code defensive programming

How much does the mlperf list weigh when AI is named?

2022最新Android面试笔试,一个安卓程序员的面试心得

UDF implementation of Dameng database

Case sharing | integrated construction of data operation and maintenance in the financial industry

图扑软件数字孪生 | 基于 BIM 技术的可视化管理系统

Tianyi cloud understands enterprise level data security in this way

cf:B. Almost Ternary Matrix【对称 + 找规律 + 构造 + 我是构造垃圾】
随机推荐
泰山OFFICE技术讲座:由行的布局高度,谈绘制高度的高度溢出、高度缩水(全网首发)
Powerful tool for collection processing
UDF implementation of Dameng database
After the company went bankrupt, the blackstones came
The easycvr authorization expiration page cannot be logged in. How to solve it?
AI表现越差,获得奖金越高?纽约大学博士拿出百万重金,悬赏让大模型表现差劲的任务
为什么 BI 软件都搞不定关联分析?带你分析分析
What is text mining? "Suggested collection"
Go语言学习教程(十五)
小程序 修改样式 ( placeholder、checkbox的样式)
Shang Silicon Valley Shang preferred project tutorial release
7-1 linked list is also simple fina
Go语言学习教程(十六)
视频融合云平台EasyCVR增加多级分组,可灵活管理接入设备
CF: B. almost Ternary Matrix [symétrie + règles de recherche + Construction + I am Construction Waste]
块编辑器如何选择?印象笔记 Verse、Notion、FlowUs
Ten years at sea: old and new relay, dark horse rising
Windows Oracle 开启远程连接 Windows Server Oracle 开启远程连接
2022年阿里Android高级面试题分享,2022阿里手淘Android面试题目
2022最新大厂Android面试真题解析,Android开发必会技术