淘宝分布式关系数据库处理系统---Cobar配置说明
来源:互联网 发布:c语言结束符 编辑:程序博客网 时间:2024/05/22 20:47
Cobar淘宝
下载Cobar:
https://github.com/alibaba/cobar
功能概述:
Cobar是关系型数据的分布式处理系统,它可以在分布式的环境下看上去像传统数据库一样为您提供海量数据服
务。
目录介绍:
Bin目录
Conf目录
文件配置:
Schema.xml
<!--数据源定义,数据源是一个具体的后端数据连接的表示。-->
<dataSourcename="dsTest" type="mysql">
<property name="location">
<location>192.168.1.33:3306/dbtest1</location>
<location>192.168.1.33:3306/dbtest2</location>
<location>192.168.1.33:3306/dbtest3</location>
</property>
<property name="user">root</property>
<property name="password">xxxx</property>
<propertyname="sqlMode">STRICT_TRANS_TABLES</property>
</dataSource>
Server.xml
<!--用户访问定义,用户名、密码、schema等信息。 -->
<username="dingsai88">
<property name="password">888888</property>
<propertyname="schemas">dbtest</property>
</user>
创建数据库:
dropdatabase if exists dbtest1;
createdatabase dbtest1;
usedbtest1;
createtable tb1(id int not null,gmt datetime);
dropdatabase if exists dbtest2;
createdatabase dbtest2;
usedbtest2;
createtable tb2(id int not null,val varchar(256));
dropdatabase if exists dbtest3;
createdatabase dbtest3;
usedbtest3;
createtable tb2(id int not null,val varchar(256));
测试:
登录:
C:\ProgramFiles\MySQL\MySQL Server 5.1\bin>mysql -hlocalhost -P8066 -udingsai88
-p
Enterpassword: ******
Welcometo the MySQL monitor. Commands end with; or \g.
YourMySQL connection id is 2 to server version: 5.1.48-cobar-1.2.7
Type'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>use dbtest;
Databasechanged
mysql>show tables;
+------------------+
|Tables_in_dbtest |
+------------------+
|tb2 |
|tb1 |
+------------------+
2rows in set (0.50 sec)
mysql>
插入数据:
insertinto tb1(id,gmt)values(1,now());
insertinto tb2(id,val)values(1,"part1");
insertinto tb2(id,val)values(2,"part1"),(513,"part2");
查询:
mysql>select * from tb2;
+-----+-------+
|id | val |
+-----+-------+
| 1 | part1 |
| 2 | part1 |
|513 | part2 |
+-----+-------+
3rows in set (0.09 sec)
mysql>select * from tb2 where id in(1,513);
+-----+-------+
|id | val |
+-----+-------+
|513 | part2 |
| 1 | part1 |
+-----+-------+
2rows in set (0.03 sec)
产品约束问题:
mysql>select * from tb1 where id in (select id from tb2);
ERROR1146 (HY000): Table 'dbtest2.tb1' doesn't exist
mysql>
- 淘宝分布式关系数据库处理系统---Cobar配置说明
- 淘宝MySQL分布式处理系统Cobar部署
- 关系型数据的分布式处理系统:Cobar
- 淘宝分布式架构Cobar
- Cobar分布式关系型数据库中间件的简单应用
- 分布式关系数据库中间件swiftdb (类似mycat、cobar中间件)
- 阿里巴巴分布式数据库cobar
- cobar安装配置说明
- 阿里巴巴分布式数据库解决方案——Cobar中间件配置详解
- 用cobar搭建分布式数据库
- 用cobar搭建分布式数据库 .
- 淘宝Tair分布式缓存数据库系统内部结构
- 淘宝Tair分布式缓存数据库系统主要功能
- 分布式数据库中间件–(3) Cobar对简单select命令的处理过程
- Nginx+session共享+memcached+cobar 前端负载均衡+数据库分布式处理(基础版本)
- 阿里巴巴分布式数据库解决方案——Cobar中间件配置详解 (转)
- 数据库–Cobar分布式数据库集群MySQL中间件
- 数据库–Cobar分布式数据库集群MySQL中间件
- Android颜色对照表
- 获取iOS设备当前ip地址
- jQuery/Ajax/PHP/Json 的一个综合例子
- 实现服务器端下载的MIME头
- NAND FLASH
- 淘宝分布式关系数据库处理系统---Cobar配置说明
- 后缀数组(重复次数最多的最长重复子串)—— POJ 3693
- PHP JQUERY JSON 实例
- 表单校验组件ValidForm(2)
- web Deploy发布wcf
- POJ 3123 Ticket to Ride 状压dp+树形dp 斯坦纳树
- Spring2.5整合RMI技术
- Xcode6的路径变化
- LayoutParams的用法