This topic describes how to handle ERROR 1045, where an incorrect password is entered for logging on to the MySQL mode of OceanBase Database.
Symptom
The system reports an error when you enter an incorrect password for logon.
[admin@k08j13249.eu95sqa /home/admin]
$obclient -hxx.xx.xx.1 -P2881 -uny1@MySQL -p**8*** -A
ERROR 1045 (42000): Access denied for user 'ny1'@'xxx.xxx.xxx.xxx' (using password: YES)
The error codes corresponding to this error message are as follows:
Error code: ERROR 1045
Error code in OceanBase Database: 4043
Error code compatible with MySQL Database: 1045
For more information about the error codes, see Overview of error messages.
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.
Note
If you log on as the administrator, you can directly change the passwords for users. If you log on as a regular user, you must have the global
CREATE USERprivilege to change the password of another user.Change the password of the
ny1user.obclient> ALTER USER 'ny1' IDENTIFIED BY '**8***'; 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 Password complexity.
Log on to the
MySQLtenant as theny1user again.[admin@k08j13249.eu95sqa /home/admin] $obclient -h10.10.10.1 -P2881 -uny1@MySQL -p****** -A Welcome to the OceanBase monitor. Commands end with ; or \g. Your OceanBase connection id is 3221490183 Server version: 5.7.25 OceanBase 4.0.0.0 (r100000152022092610-404b3d7117dd0035698010c6e3b07948abc0e433) (Built Sep 26 2022 10:34:25) Copyright (c) 2000, 2018, OceanBase Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.