首批通过分布式安全可靠测评,为关键业务系统打造
Oracle 模式下用户密码错误,错误代码 ERROR 1045
更新时间:2023-12-07 03:16
本文介绍 OceanBase 数据库 Oracle 模式下用户密码输入错误后报 ERROR 1045 错误的处理方法。
问题现象
用户登录数据库时,忘记了密码,导致密码输入错误,报错。
[admin@k08j13249.eu95sqa /home/admin]
$obclient -h10.0.0.0 -P2881 -uny@Oracle -p -A
Enter password:
ERROR 1045 (42000): Access denied for user 'NY'@'xxx.xxx.xxx.xxx' (using password: YES)
解决方法
请参考以下步骤,修改用户密码后,重新登录。
使用管理员用户登录到集群相应的租户。Oracle 租户默认的管理员用户为
SYS用户。说明
解锁用户的操作一般由管理员完成,普通用户如果需要执行解锁操作,必须具备全局
ALTER USER权限。[admin@k08j13249.eu95sqa /home/admin] $obclient -hxx.xx.xx.1 -P2881 -usys@Oracle -p -A Enter password: Welcome to the OceanBase. Commands end with ; or \g. Your OceanBase connection id is 3221584177 Server version: OceanBase 4.0.0.0 (r100000172022101218-6ab80a3950710941946c004d805fcfded7a4aa2c) (Built Oct 12 2022 18:43:39) Copyright (c) 2000, 2018, OceanBase Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.修改
ny用户的密码。obclient [SYS]> ALTER USER ny IDENTIFIED BY ***3***; Query OK, 0 rows affected说明
为用户设置密码时,用户密码需要符合当前租户的密码复杂度。密码复杂度相关操作及说明请参见 密码复杂度。
再次使用
ny用户登录集群的Oracle租户。[admin@k08j13249.eu95sqa /home/admin] $obclient -hxx.xx.xx.1 -P2881 -uny@Oracle -p****** -A Enter password: Welcome to the OceanBase. Commands end with ; or \g. Your OceanBase connection id is 3221584177 Server version: OceanBase 4.0.0.0 (r100000172022101218-6ab80a3950710941946c004d805fcfded7a4aa2c) (Built Oct 12 2022 18:43:39) Copyright (c) 2000, 2018, OceanBase Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.