Unknown database

【产品名称】oceanbase-ce

【产品版本】3.1

【问题描述】

$ mysql -h 127.1 -u root@obmysql -P 2881 -p -c -A oceanbase -Ns

MySQL [oceanbase]> show databases;

oceanbase

information_schema

mysql

test

问题一:

这个-Ns是什么意思?

问题二:

MySQL [oceanbase]> use test

ERROR 1049 (42000): Unknown database

问题三:

MySQL [oceanbase]> select user,host from mysql.user;

ERROR 1146 (42S02): Table ‘mysql.user’ doesn’t exist

首先 加上-Ns后,登录直接进入命令行模式,没有如下信息:


Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 19

Server version: 5.7.1 OceanBase 3.1.2 (r10000392021123010-d4ace121deae5b81d8f0b40afbc4c02705b7fc1d) (Built Dec 30 2021 02:47:29)

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

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.


然后 麻烦确认下test库是否存在

最后 麻烦确认下表mysql.user是否存在,建议退出重新登录试下。