本文为您介绍用户被锁的相关报错及处理方式。
错误:ERROR 3118
错误码
OceanBase 错误码:5039
兼容 MySQL 错误码:3118
报错信息
ERROR 3118 (HY000):User locked
示例
登录 ny1 提示用户被锁。
[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 3118 (HY000): User locked
解决方法
登录
root用户。[admin@k08j13249.eu95sqa /home/admin] $obclient -h10.10.10.1 -P2881 -uroot@MySQL -p -A Enter password: Welcome to the OceanBase. Commands end with ; or \g. Your OceanBase connection id is 3221583668 Server version: OceanBase 3.2.4.0 (r100000072022102819-2a28da9e758e2d232c41fa1a1b0070a08b77dd7d) (Built Oct 28 2022 19:46:38) Copyright (c) 2000, 2018, OceanBase Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.解锁用户
ny1。obclient> ALTER USER 'ny1' account UNLOCK; Query OK, 0 rows affected再次登录
ny1用户。[admin@k08j13249.eu95sqa /home/admin] $obclient -h10.10.10.1 -P2881 -uny1@MySQL -p -A Enter password: Welcome to the OceanBase. Commands end with ; or \g. Your OceanBase connection id is 3221583668 Server version: OceanBase 3.2.4.0 (r100000072022102819-2a28da9e758e2d232c41fa1a1b0070a08b77dd7d) (Built Oct 28 2022 19:46:38) Copyright (c) 2000, 2018, OceanBase Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.