This topic describes how to handle ERROR 1045, where an incorrect password is entered for logon in OceanBase Database in Oracle mode.
Symptom
The system reports an error when you enter an incorrect password for logon.
[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)
Troubleshooting procedure
Take the following steps to change the password for a user and log on again.
Log on to the tenant as the administrator. The default administrator username of an Oracle tenant is
SYS.Note
If you log on as the administrator, you can directly unlock users. If you log on as a regular user, you must have the global
ALTER USERprivilege to unlock users.[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.Change the password of the
nyuser.obclient [SYS]> ALTER USER ny IDENTIFIED BY ***3***; Query OK, 0 rows affectedNote
When you set the password for a user, the password must meet the password complexity requirements of the current tenant. For more information about password complexity, see Set password complexity rules.
Log on as the
nyuser again.[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.