|
-----------------+
| Leshami | http://blog.csdn.net/leshami |
+---------+------------------------------+
-- 下面分别从各个分片节点直接访问,可以看到每一个分片节点都有相对应的数据行
(root@192.168.1.143:3307) [(none)]> select * from db2.company;
+----+-------+----------+
| id | ename | loc |
+----+-------+----------+
| 1 | IBM | ShenZhen |
+----+-------+----------+
(root@192.168.1.204:3306) [(none)]> select * from db1.company;
+----+-------+----------+
| id | ename | loc |
+----+-------+----------+
| 1 | IBM | ShenZhen |
+----+-------+----------+
1 row in set (0.00 sec)
|