This topic describes errors related to an incorrect user password and the troubleshooting procedure.
Error: ERROR 1045 (42000)
Error code
1045
Error message
ERROR 1045 (42000): Access denied for user '%.*s'@'%.*s' (using password: %s)
Example
When you log on as the ny1 user but enter an incorrect password, this error is returned.
[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)
Troubleshooting procedure
Log on as the
rootuser.[admin@k08j13249.eu95sqa /home/admin] $obclient -h10.10.10.1 -P2881 -uroot@MySQL -p_***2***_ -A Welcome to the OceanBase. Commands end with ; or \g. Your OceanBase connection id is 3221583849 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
ny1user.obclient> ALTER USER 'ny1' IDENTIFIED BY '**8***'; Query OK, 0 rows affectedLog on as the
ny1user again.[admin@k08j13249.eu95sqa /home/admin] $obclient -h10.10.10.1 -P2881 -uny1@MySQL -p**8*** -A Welcome to the OceanBase. Commands end with ; or \g. Your OceanBase connection id is 3221583849 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.