error日志提示:
[ERROR] Slave I/O for channel '': Fatal error: The slave I/O thread stops because master and slave hav
e equal MySQL server UUIDs; these UUIDs must be different for replication to work. Error_code: 1593
mysql> create table user (
-> uid int auto_increment,
-> data json,primary key(uid)
-> );
Query OK, 0 rows affected (0.27 sec)
mysql> insert into user values (NULL,'{"name":"David","mail":"jiangchengyao@gmail.com","address":"Shangahai"}');
Query OK, 1 row affected (0.64 sec)
mysql> insert into user values (NULL,'{"name":"Amy","mail":"amy@gmail.com"}');
Query OK, 1 row affected (0.14 sec)
mysql> select data->"$.name" from user;
+----------------+
| data->"$.name" |
+----------------+
| "David" |
| "Amy" |
+----------------+
2 rows in set (0.16 sec)
mysql>
2).slave
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| testdb |
+--------------------+
5 rows in set (0.00 sec)
mysql> use testdb
Database changed
mysql> show tables;
+------------------+
| Tables_in_testdb |
+------------------+
| user |
+------------------+
1 row in set (0.00 sec)
mysql> desc user;
+-------+---------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------+------+-----+---------+----------------+
| uid | int(11) | NO | PRI | NULL | auto_increment |
| data | json | YES | | NULL | |
+-------+---------+------+-----+---------+----------------+
2 rows in set (0.01 sec)
mysql> SHOW CREATE TABLE user\G;
*************************** 1. row ***************************
Table: user
Create Table: CREATE TABLE `user` (
`uid` int(11) NOT NULL AUTO_INCREMENT,
`data` json DEFAULT NULL,
PRIMARY KEY (`uid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8
1 row in set (0.00 sec)
ERROR:
No query specified
mysql> select data ->"$.name" from user;
+-----------------+
| data ->"$.name" |
+-----------------+
| "David" |
| "Amy" |
+-----------------+
2 rows in set (0.03 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| testdb |
+--------------------+
5 rows in set (0.01 sec)
mysql> use performance_schema
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A