当前位置:网站首页>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
边栏推荐
- CDB 实例的启动与关闭
- Overview of video self supervised learning
- You can have both fish and bear's paw! Sky wing cloud elastic bare metal is attractive!
- Word查找红色文字 Word查找颜色字体 Word查找突出格式文本
- AI表现越差,获得奖金越高?纽约大学博士拿出百万重金,悬赏让大模型表现差劲的任务
- Is the performance evaluation of suppliers in the fastener industry cumbersome? Choose the right tool to easily counter attack!
- 华律网牵手观测云,上线系统全链路可观测平台
- The era of Web3.0 is coming. See how Tianyi cloud storage resources revitalize the system to enable new infrastructure (Part 2)
- 决策树与随机森林
- Go语言 | 01 WSL+VSCode环境搭建避坑指南
猜你喜欢

彻底理解为什么网络 I/O 会被阻塞?
![[HCIA cloud] [1] definition of cloud computing, what is cloud computing, architecture and technical description of cloud computing, Huawei cloud computing products, and description of Huawei memory DD](/img/b8/624799e4bf788e4476b155486f478b.png)
[HCIA cloud] [1] definition of cloud computing, what is cloud computing, architecture and technical description of cloud computing, Huawei cloud computing products, and description of Huawei memory DD

Tianyi cloud understands enterprise level data security in this way

Powerful tool for collection processing

Word查找红色文字 Word查找颜色字体 Word查找突出格式文本
![2022 the most complete Tencent background automation testing and continuous deployment practice in the whole network [10000 words]](/img/4b/90f07cd681b1e0595fc06c9429b338.jpg)
2022 the most complete Tencent background automation testing and continuous deployment practice in the whole network [10000 words]

ICML2022 | 长尾识别中分布外检测的部分和非对称对比学习

Word finds red text word finds color font word finds highlighted formatted text

How to quickly advance automated testing? Listen to the personal feelings of the three bat test engineers

2022最新大厂Android面试真题解析,Android开发必会技术
随机推荐
R language Visual scatter plot graph, add labels to some data points in the graph, and always display all labels, even if they have too much overlap. Ggrep package helps
R语言使用lubridate包处理日期和时间数据实战
【历史上的今天】7 月 5 日:Google 之母出生;同一天诞生的两位图灵奖先驱
5. Data access - entityframework integration
技术分享 | 常见接口协议解析
Shang Silicon Valley Shang preferred project tutorial release
RedHat7.4配置yum软件仓库(RHEL7.4)
机器学习基础(三)——KNN/朴素贝叶斯/交叉验证/网格搜索
c语言简便实现链表增删改查「建议收藏」
在线协作产品哪家强?微软 Loop 、Notion、FlowUs
MySQL优化六个点的总结
鱼和熊掌可以兼得!天翼云弹性裸金属一招鲜!
为什么 BI 软件都搞不定关联分析?带你分析分析
紧固件行业供应商绩效考核繁琐?选对工具才能轻松逆袭!
Mysql database indexing tutorial (super detailed)
Common time complexity
Thoroughly understand why network i/o is blocked?
Powerful tool for collection processing
Windows Oracle open remote connection Windows Server Oracle open remote connection
cf:B. Almost Ternary Matrix【对称 + 找规律 + 构造 + 我是构造垃圾】