测试环境,ob-ce-3.1.4
利用obd部署的集群:
$ obd cluster list
+------------------------------------------------------+
| Cluster List |
+--------+---------------------------+-----------------+
| Name | Configuration Path | Status (Cached) |
+--------+---------------------------+-----------------+
| obtest | /root/.obd/cluster/obtest | running |
+--------+---------------------------+-----------------+
obproxy版本
$ /home/admin/obproxy/bin/obproxy -V
obproxy (OceanBase 3.2.3.5 2)
ob版本:ob-ce-3.1.4
Server version: 5.7.25 OceanBase 3.1.4 (r100000112022102717-39c3a048177154899edf1160e873979ea78dadd1) (Built Oct 27 2022 18:03:03)
无法通过obproxy连接到sys租户:
$ mysql -h127.0.0.1 -P3308 -uroot@sys -A
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 0
$ obclient -h127.0.0.1 -P3308 -uroot@sys -A
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 11
# 只能连接到proxysys租户
$ obclient -h127.0.0.1 -P3308 -uroot@proxysys -A
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 2097163
Server version: 5.6.25
Copyright (c) 2000, 2022, OceanBase and/or its affiliates. All rights reserved.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
obclient [(none)]> show processlist;
+---------+----------+------+-----------------+------+-------------+-------------------+-------------------+-------+-------+
| Id | Tenant | User | Host | db | trans_count | svr_session_count | state | tid | pid |
+---------+----------+------+-----------------+------+-------------+-------------------+-------------------+-------+-------+
| 2097163 | proxysys | root | 127.0.0.1:51326 | NULL | 0 | 0 | MCS_ACTIVE_READER | 55004 | 54986 |
| 2 | proxysys | root | 127.0.0.1:51266 | NULL | 0 | 0 | MCS_ACTIVE_READER | 54986 | 54986 |
| 1048583 | proxysys | root | 127.0.0.1:51280 | NULL | 0 | 0 | MCS_ACTIVE_READER | 55003 | 54986 |
+---------+----------+------+-----------------+------+-------------+-------------------+-------------------+-------+-------+
3 rows in set (0.000 sec)
# 但是遇到各种异常
obclient [(none)]> \s
ERROR 2027 (HY000): received malformed packet
obclient [(none)]> show databases;
+--------------------------+-------------------+
| Variable_name | Value |
+--------------------------+-------------------+
| tx_isolation | READ-COMMITTED |
| system_time_zone | +08:00 |
| time_zone | +08:00 |
| character_set_server | utf8mb4 |
| character_set_client | utf8mb4 |
| interactive_timeout | 28800 |
| query_cache_size | 1048576 |
| character_set_results | utf8mb4 |
| max_allowed_packet | 4194304 |
| sql_mode | STRICT_ALL_TABLES |
| net_buffer_length | 16384 |
| wait_timeout | 28800 |
| lower_case_table_names | 2 |
| query_cache_type | OFF |
| init_connect | |
| transaction_isolation | READ |
| character_set_connection | utf8mb4 |
| net_write_timeout | 60 |
+--------------------------+-------------------+
18 rows in set (0.000 sec)
obclient [(none)]> use oceanbase;
ERROR 2013 (HY000): Lost connection to MySQL server during query
obclient [(none)]> use test;
No connection. Trying to reconnect...
Connection id: 2097166
Current database: *** NONE ***
ERROR 2013 (HY000): Lost connection to MySQL server during query
obclient [(none)]>