---
title: 用户密码错误报错-V3.2.4-OceanBase 数据库文档-分布式数据库使用文档
description: 分布式数据库OceanBase 企业版文档中心，提供关于用户密码错误报错的相关内容，方便用户更好的应用分布式数据库OceanBaseOceanBase 数据库
image: https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*OSPzQ6GUQF4AAAAAQHAAAAgAeiGDAQ/original
---
[OceanBase AI 数据大会](https://www.oceanbase.com/conference2026 "OceanBase AI 数据大会")文档反馈![](https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*P8CuR4UJ_FkAAAAAAAAAAAAADiGDAQ/original) OceanBase 数据库分布式版 - V 3.2.4 企业版 LTS

# 用户密码错误报错

更新时间：2026-07-03 15:50:07

本文为您介绍用户密码的相关报错及处理方式。

## 报错：ERROR 1045 (42000)

### 错误码

1045

### 错误信息

```sql
ERROR 1045 (42000) : Access denied for user '%.*s'@'%.*s' (using password: %s)

```

### 示例

登录 `user` 用户时忘记了密码。

```sql
[admin@k08j13249.eu95sqa /home/admin]
$obclient -h10.10.10.1 -P2881 -uny1@MySQL -p**8*** -A
obclient: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (42000): Access denied for user 'ny1'@'xxx.xxx.xxx.xxx' (using password: YES)

```

## 如何处理

1. 登录 `root` 用户。

   ```sql
   [admin@k08j13249.eu95sqa /home/admin]
   $obclient -h10.10.10.1 -P2881 -uroot@MySQL -p -A
   Enter password:
   Welcome to the OceanBase.  Commands end with ; or \g.
   Your OceanBase connection id is 3221583828
   Server version: OceanBase 3.2.4.0 (r100000072022102819-2a28da9e758e2d232c41fa1a1b0070a08b77dd7d) (Built Oct 28 2022 19:46:38)

   Copyright (c) 2000, 2018, OceanBase Corporation Ab and others.

   Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

   ```
 2. 修改 `ny1` 密码。

   ```sql
   obclient> ALTER USER 'ny1' IDENTIFIED BY '**8***';
   Query OK, 0 rows affected

   ```
 3. 再次登录 `ny1` 用户。

   ```sql
   [admin@k08j13249.eu95sqa /home/admin]
   $obclient -h10.10.10.1 -P2881 -uny1@MySQL -p -A
   Enter password:
   Welcome to the OceanBase.  Commands end with ; or \g.
   Your OceanBase connection id is 3221583828
   Server version: OceanBase 3.2.4.0 (r100000072022102819-2a28da9e758e2d232c41fa1a1b0070a08b77dd7d) (Built Oct 28 2022 19:46:38)

   ```

 上一篇 下一篇 ![有帮助](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) 咨询
