基于湖库一体架构,统一管理结构化、半结构化与非结构化等多模态数据,一个系统承载事务处理、实时分析与 AI 工作负载。
部署后验证
更新时间:2023-07-18 17:25:59
创建 OceanBase 数据库租户后,您可以通过以下方式验证 OBProxy 服务与 OceanBase 数据库的连通性。
使用 MySQL 或 OBclient 客户端登录 OBProxy 代理服务的 ip:port,确保能联通 OceanBase 数据库并执行测试语句成功。
连接 OceanBase 数据库
$obclient -h[OBProxy的IP地址] -P2883 -u[用户名]@[租户名]#[集群名] -p -A
Enter password:
Welcome to the OceanBase monitor. Commands end with ; or \g.
Your OceanBase connection id is 3221623606
Server version: 5.7.25 OceanBase 3.2.3.2 (r20220805104621-f73c9dfcc65ecd19c9c87afc0ee33809aca32f63) (Built Aug 5 2022 10:59:54)
<Omitted>
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
obclient>
说明
连接参数解释如下:
- -h:提供 OceanBase 数据库连接 IP,通常是一个 OBProxy 域名。
- -u:提供租户的连接账户,格式有两种:用户名@租户名#集群名 或者 集群名:租户名:用户名。MySQL 租户的管理员用户名默认是 root;Oracle 租户的管理员用户名默认是 SYS。
- -P:提供 OceanBase 数据库连接端口,也是 OBProxy 的监听端口。
- -p:提供账户密码,为了安全可以不提供,改为在后面提示符下输入,密码文本不可见。
- -c:表示在 MySQL 运行环境中不要忽略注释。
- -Ne:表示在 MySQL 连接数据库时执行 SQL 语句。