我log是空的~~我也不知道错在哪里…这样可以登录,但db是none的,估计不知道哪步做错了…
[root@master log]# pwd
/d99/oceanbase-ce/log
[root@master log]# pwd
/d99/oceanbase-ce/log
[root@master log]# ls
[root@master log]# obclient -h192.168.20.99 -P2881 -A
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 3221226642
Server version: OceanBase_CE 4.5.0.0 (r100000012025112711-0e8d5ad012baf0953b2032a35a88bdf8886e9a7a) (Built Nov 27 2025 12:06:16)
Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
obclient(root@sys)[(none)]> ALTER SYSTEM BOOTSTRAP ZONE ‘zone1’ SERVER ‘192.168.20.99:2882’;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near ‘‘192.168.20.99:2882’’ at line 1
obclient(root@sys)[(none)]> show database;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near ‘database’ at line 1
obclient(root@sys)[(none)]>
root@master d99]# obclient -h192.168.20.99 -P2881 -uroot@sys -A
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 3221227354
Server version: OceanBase_CE 4.5.0.0 (r100000012025112711-0e8d5ad012baf0953b2032a35a88bdf8886e9a7a) (Built Nov 27 2025 12:06:16)
Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
谢谢大家!解决了,原来还要初始化一下Zone1.
obclient(root@sys)[(none)]> set session ob_query_timeout=1000000000;
Query OK, 0 rows affected (0.009 sec)
obclient(root@sys)[(none)]> alter system bootstrap ZONE ‘zone1’ SERVER ‘192.168.20.99:2882’;
Query OK, 0 rows affected (35.387 sec)
obclient(root@sys)[oceanbase]> SELECT SVR_IP, SVR_PORT, ZONE, STATUS FROM oceanbase.DBA_OB_SERVERS;
±--------------±---------±------±-------+
| SVR_IP | SVR_PORT | ZONE | STATUS |
±--------------±---------±------±-------+
| 192.168.20.99 | 2882 | zone1 | ACTIVE |
±--------------±---------±------±-------+
1 row in set (0.010 sec)