This topic describes errors related to a locked user and the troubleshooting procedure.
Error: ERROR 3118
Error code
Error code in OceanBase Database: 5039
MySQL error code: 3118
Error messages
ERROR 3118 (HY000):User locked
Example
When you log on as the ny1 user, this error is returned, indicating that this user is locked.
[admin@k08j13249.eu95sqa /home/admin]
$obclient -h10.10.10.1 -P2881 -uny1@MySQL -p****** -A
obclient: [Warning] Using a password on the command line interface can be insecure.
ERROR 3118 (HY000): User locked
Troubleshooting procedure
Log on as the
rootuser.[admin@**** /home/admin] $obclient -h10.10.10.1 -P2881 -uroot@MySQL -p_*******_ -A obclient: [Warning] Using a password on the command line interface can be insecure. Welcome to the OceanBase monitor. Commands end with ; or \g. Your OceanBase connection id is 3221678880 Server version: 5.7.25 OceanBase 4.0.0 (r20220110212853-f55615d0df8c3c2ca5dcd6b5dba8f0acd18c6264) (Built Jan 10 2022 22:09:16) Copyright (c) 2000, 2022, OceanBase and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.Unlock the
ny1user.obclient> ALTER USER 'ny1' account UNLOCK; Query OK, 0 rows affectedLog on as the
ny1user again.[admin@**** /home/admin] $obclient -h10.10.10.1 -P2881 -uny1@MySQL -p****** -A obclient: [Warning] Using a password on the command line interface can be insecure. Welcome to the OceanBase monitor. Commands end with ; or \g. Your OceanBase connection id is 3221678914 Server version: 5.7.25 OceanBase 4.0.0 (r20220110212853-f55615d0df8c3c2ca5dcd6b5dba8f0acd18c6264) (Built Jan 10 2022 22:09:16) Copyright (c) 2000, 2022, OceanBase and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.