---
title: 如何通过 ODP-Sharding 控制台修改 ODP meta 租户的 admin 用户密码-OceanBase数据库使用指南
description: 了解OceanBase数据库在实际应用中关于 如何通过 ODP-Sharding 控制台修改 ODP meta 租户的 admin 用户密码相关的常见问题和使用技巧，帮助您快速解决 如何通过 ODP-Sharding 控制台修改 ODP meta 租户的 admin 用户密码的难题。
image: https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*OSPzQ6GUQF4AAAAAQHAAAAgAeiGDAQ/original
---
[OceanBase AI 数据大会](https://www.oceanbase.com/conference2026 "OceanBase AI 数据大会")

## 体验新一代 AI 数据平台

[立即咨询](https://www.oceanbase.com/contactus) [免费试用 免费试用](https://www.oceanbase.com/free-trial)划线反馈

# 如何通过 ODP-Sharding 控制台修改 ODP meta 租户的 admin 用户密码

更新时间：2025-03-21 06:26

适用版本： V2.x、V3.x 内容类型：How-to  

ODP-Sharding 控制台无法直接修改 admin 用户的密码，本文总结如何通过修改 meta 库修改 admin 用户密码。

通过控制台修改密码时会提示错误 `user 0000011 role is an administrator, please use the administrator role to modify the administrator identity information in the global configuration function`。

可以通过以下步骤修改 admin 用户：

1. 通过 ODP meta 租户连接到 metadb 集群。
 2. 开启鉴权。

   ```shell
   obclient [(none)]> use dbpconsole_db;
   Database changed

   ```

   ```shell
   obclient [dbpconsole_db]> update zdalproxy_config set config_value='true' where config_key='global_auth_check';
   Query OK, 0 rows affected (0.01 sec)
   Rows matched: 1  Changed: 0  Warnings: 0

   ```

   ```shell
   obclient [dbpconsole_db]> select * from dbpconsole_db.zdalproxy_config where `config_key`='global_auth_check';
   +-----+---------------------+---------------------+------------+----------+-------------------+--------------+------------------------------------------------------+
   | id  | gmt_create          | gmt_modified        | env_tenant | env_mode | config_key        | config_value | description                                          |
   +-----+---------------------+---------------------+------------+----------+-------------------+--------------+------------------------------------------------------+
   | 242 | 2023-09-13 15:55:50 | 2023-09-13 15:55:50 | -          | -        | global_auth_check | true         | 是否需要权限校验，不加配置相当于true                 |
   +-----+---------------------+---------------------+------------+----------+-------------------+--------------+------------------------------------------------------+

   ```
 3. 插入密码配置项。

   ```shell
   obclient [dbpconsole_db]> INSERT INTO `zdalproxy_config`(`gmt_create`, `gmt_modified`, `env_tenant`, `env_mode`, `config_key`, `config_value`, `description`)  VALUES (now(), now(), '-', '-', 'global_embedded_user_info_key', '[{"userId":"0000011","username":"admin","password":"xxxxxx"}]', '修改密码');
   Query OK, 1 row affected (0.01 sec)

   ```

   ```shell
   obclient [dbpconsole_db]> select * from zdalproxy_config order by id desc limit 1;
   +---------+---------------------+---------------------+------------+----------+-------------------------------+--------------------------------------------------------------------+--------------+
   | id      | gmt_create          | gmt_modified        | env_tenant | env_mode | config_key                    | config_value                                                       | description  |
   +---------+---------------------+---------------------+------------+----------+-------------------------------+--------------------------------------------------------------------+--------------+
   | 2000317 | 2023-09-19 10:50:06 | 2023-09-19 10:50:06 | -          | -        | global_embedded_user_info_key | [{"userId":"0000011","username":"admin","password":"xxxxxx"}] | 修改密码     |
   +---------+---------------------+---------------------+------------+----------+-------------------------------+--------------------------------------------------------------------+--------------+
   1 row in set (0.01 sec)

   ```
 4. 修改密码或增加用户与步骤 3 类似。

   ```shell
   obclient [dbpconsole_db]> update zdalproxy_config set config_value='[{"userId":"000001","username":"admin","password":"xxxxxx"},{"userId":"000002","username":"test","password":"xxxxxx"}]'
   where config_key='global_embedded_user_info_key';
   Query OK, 1 row affected (0.02 sec)
   Rows matched: 1  Changed: 1  Warnings: 0

   ```

## 适用版本

ODP Sharding 所有版本

上一篇

[通过主 ODP 创建逻辑表，通过备 ODP 查询创建结果有较长的延时](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000267155)

下一篇

[obproxy 如何开启 debug 模式](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000002394570) ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ) 咨询
