联系我们
18591797788
hubin@rlctech.com
北京市海淀区中关村南大街乙12号院天作国际B座1708室
18681942657
lvyuan@rlctech.com
上海市浦东新区商城路660号乐凯大厦26c-1
18049488781
xieyi@rlctech.com
广州市越秀区东风东路华宫大厦808号1608房
029-81109312
service@rlctech.com
西安市高新区天谷七路996号西安国家数字出版基地C座501
在日常运维工作中,难免会遇到MetaDB租户密码遗忘、丢失的情况,为了方便大家快速排查、找回密码,高效解决运维问题,本文整理了MetaDB业务租户密码找回和MetaDB Sys租户密码找回的完整操作步骤。
1)登陆OAT容器
docker exec -it oat bash
2)执行管理脚本
python3 /oat/manage.py shell
3)输入以下内容后,按回车
from oat.models import Component
4)先按TAB键,再回车,输入以下内容后,再次按回车
for c in Component.objects.filter(type='metadb'): c.inner_service
再回车键即可

获取root@sys密码
step1:从OAT白屏获取 MetaDB 组件名字
step2:进入OAT容器
docker exec -it oat bash
step3:查询OAT元数据中存储的root@sys密码
python3 manage.py shell <<< "from oat.models import Component; print(Component.objects.get(name='${替换为MetaDB名字}').config['sys_root_password'])"
step4:查询OAT元数据中存储的proxysys@sys密码
python3 manage.py shell <<< "from oat.models import Component; print(Component.objects.get(name='${替换为MetaDB名字}').config['proxysys_password'])"
如果你在实际操作中遇到问题,可以在评论区留言交流。后续我们会持续分享更多运维干货,记得关注不迷路,下次见~