当前位置:网站首页>HAC cluster modifying administrator user password
HAC cluster modifying administrator user password
2022-07-06 05:19:00 【Hangao PG Laboratory】
Henkel database
Catalog
Environmental Science
Document purpose
Details
Environmental Science
system platform :Linux x86-64 Red Hat Enterprise Linux 7
edition :4.5.6,4.5.7
Document purpose
This document is used to guide HAC The cluster modifies the administrator user password
Details
1、 Check cluster status , Use A、B There are two ways to judge
Method A: Use the cluster command , Make sure TL The timeline is consistent ,Lag in MB The data synchronization delay should not be too high , The best delay is 0.
[[email protected] ~]# 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 |
+----------+---------------------+---------+---------+----+-----------+
Method B: Each node queries the process , Yes sender The node is the main library , Yes receiver The node is a standby database
ps -ef | grep sender
root 26418 3233 0 6 month 11 ? 00:00:22 postgres: c: walsender sysdba 192.168.80.228(45186) streaming 0/16000000
ps -ef | grep receiver
root 3372 3348 0 6 month 11 ? 00:13:54 postgres: c: walreceiver streaming 0/16000000
2、 Pause the cluster
( Any node can execute , Suspending the cluster only stops the active / standby switchover of the cluster , It does not affect the use of the database )
hghactl pause
3、 Change Password ( It can only be executed in the main library )
highgo=# alter user sysdba with password '[email protected]!';
4、 The primary and secondary databases modify password files
vim ~/.pgpass
#hostname:port:database:username:password
localhost:5866:highgo:sysdba:[email protected]12345
localhost:5866:highgo:syssso:[email protected]12345
The colon is the separator , The penultimate user name , The last database password , Change the password to the modified password , Save and exit .
5、 The primary and standby databases modify the cluster configuration file
vim /opt/HighGo/tools/hghac/hghac.yaml
authentication:
replication:
password: [email protected]123
username: sysdba
rewind:
password: [email protected]123
username: sysdba
sysdba:
password: [email protected]123
syssso:
password: [email protected]123
syssao:
password: [email protected]123
Change the password according to the corresponding user name , Save and exit .
6、 Repository modification data In the catalog postgresql.auto.conf file
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'
Be careful :password The front one user by sysdba, That is, modify the user sysdba Password
7、 Recovery cluster ( Any node can execute )
hghactl resume
8、 Restart the cluster to take effect ( Any node can execute )
hghactl restart c
Be careful :
Last parameter c Is the name of the cluster , Check the method
ps -ef | grep -v grep |grep post |awk '{print $9}'|tail -1|awk '{sub(/.$/,"")}1'
9、 View the cluster status
hghactl list
10、 Reinitialize all nodes hgproxy
( If not used hgproxy Please skip this step )
systemctl stop hgproxy-4.0.2.service -- Stop hgproxy service ,hgproxy Please use tab Health Supplement (proxy Version of the iteration service Dissimilarity )
proxy_ctl init -h 192.168.1.54 -U sysdba -d highgo -p 5866 -- initialization
systemctl start hgproxy-4.0.2.service -- start-up hgproxy service
11、 other
perform hghactl Wait for the cluster command prompt “ Command not found ”, Please configure the environment variable , Refer to the following :
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
Be careful :
1、 You need to modify the actual path of environment variables according to the actual situation , have access to find Command to find the file path
example : lookup hghac find / -iname hghac -print
2、ETCDCTL_ENDPOINTS Three ip It needs to be modified to configuration etcd Three node ip, You can refer to /opt/HighGo/tools/hghac/hghac-see.yaml In the document etcd:hosts
边栏推荐
- A little knowledge of CPU, disk and memory
- Biscuits (examination version)
- UCF(2022暑期团队赛一)
- Configuration file converted from Excel to Lua
- Tetris
- Using stopwatch to count code time
- flutter 实现一个有加载动画的按钮(loadingButton)
- Fiddler installed the certificate, or prompted that the certificate is invalid
- Codeforces Round #804 (Div. 2)
- The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
猜你喜欢

Simple understanding of interpreters and compilers

剑指 Offer II 039. 直方图最大矩形面积

The underlying structure of five data types in redis

指针经典笔试题

Pagoda configuration mongodb

The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower

Modbus protocol communication exception
![[untitled]](/img/7e/d0724193f2f2c8681a68bda9e08289.jpg)
[untitled]

Fuzzy -- basic application method of AFL

指針經典筆試題
随机推荐
注释、接续、转义等符号
[mask requirements of OSPF and Isis in multi access network]
Flody的应用
Ora-01779: the column corresponding to the non key value saving table cannot be modified
Microblogging hot search stock selection strategy
集合详解之 Collection + 面试题
[noip2008 improvement group] stupid monkey
2022 half year summary
浅谈镜头滤镜的类型及作用
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
Zoom and pan image in Photoshop 2022
Cve-2019-11043 (PHP Remote Code Execution Vulnerability)
Postman manage test cases
Sorting out the knowledge points of multicast and broadcasting
Configuration file converted from Excel to Lua
Vulhub vulnerability recurrence 71_ Unomi
Compilation et connexion de shader dans games202 - webgl (comprendre la direction)
Oracle query table index, unique constraint, field
關於Unity Inspector上的一些常用技巧,一般用於編輯器擴展或者其他