当前位置:网站首页>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
边栏推荐
- Low code practice of xtransfer, a cross-border payment platform: how to integrate with other medium-sized platforms is the core
- 国内低代码开发平台靠谱的都有哪些?
- 小程序 修改样式 ( placeholder、checkbox的样式)
- Mathematical modeling of oil pipeline layout MATLAB, mathematical model of oil pipeline layout
- flume系列之:拦截器过滤数据
- 【历史上的今天】7 月 5 日:Google 之母出生;同一天诞生的两位图灵奖先驱
- Technology sharing | common interface protocol analysis
- Word finds red text word finds color font word finds highlighted formatted text
- CF: B. almost Ternary Matrix [symétrie + règles de recherche + Construction + I am Construction Waste]
- Oracle 中文排序 Oracle 中文字段排序
猜你喜欢
cf:B. Almost Ternary Matrix【对称 + 找规律 + 构造 + 我是构造垃圾】
数学分析_笔记_第9章:曲线积分与曲面积分
Interviewer: what is the difference between redis expiration deletion strategy and memory obsolescence strategy?
Analysis of postman core functions - parameterization and test report
Chinese postman? Really powerful!
【Autosar 十四 启动流程详解】
Redhat7.4 configure Yum software warehouse (rhel7.4)
Thoroughly understand why network i/o is blocked?
Icml2022 | partial and asymmetric comparative learning of out of distribution detection in long tail recognition
The road of enterprise digital transformation starts from here
随机推荐
Taishan Office Technology Lecture: from the layout height of the line, talk about the height overflow and height shrinkage of the drawing height (launched in the whole network)
golang通过指针for...range实现切片中元素的值的更改
The basic grammatical structure of C language
【历史上的今天】7 月 5 日:Google 之母出生;同一天诞生的两位图灵奖先驱
Benefits of automated testing
Overview of video self supervised learning
2022年5月腾讯云开发者社区视频月度榜单公布
进程间通信(IPC):共享内存
在线协作产品哪家强?微软 Loop 、Notion、FlowUs
Go语言学习教程(十五)
5. Data access - entityframework integration
基于FPGA的超声波测距
XML basic knowledge concept
Go语言 | 03 数组、指针、切片用法
自动化测试的好处
Analysis of postman core functions - parameterization and test report
7-2 keep the linked list in order
Use file and directory properties and properties
AI表现越差,获得奖金越高?纽约大学博士拿出百万重金,悬赏让大模型表现差劲的任务
A cloud opens a new future of smart transportation