{"id":46920,"date":"2023-01-05T01:47:14","date_gmt":"2023-02-22T15:17:54","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8debezium%e4%bb%8emysql%e4%b8%ad%e8%8e%b7%e5%8f%96%e5%8f%98%e6%9b%b4%e6%95%b0%e6%8d%ae%e3%80%82\/"},"modified":"2024-01-15T12:14:14","modified_gmt":"2024-01-15T04:14:14","slug":"%e4%bd%bf%e7%94%a8debezium%e4%bb%8emysql%e4%b8%ad%e8%8e%b7%e5%8f%96%e5%8f%98%e6%9b%b4%e6%95%b0%e6%8d%ae%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8debezium%e4%bb%8emysql%e4%b8%ad%e8%8e%b7%e5%8f%96%e5%8f%98%e6%9b%b4%e6%95%b0%e6%8d%ae%e3%80%82\/","title":{"rendered":"\u4f7f\u7528Debezium\u4eceMySQL\u4e2d\u83b7\u53d6\u53d8\u66f4\u6570\u636e"},"content":{"rendered":"<h1>\u9996\u5148<\/h1>\n<p>Debezium \u662f\u4e00\u4e2a\u53ef\u4ee5\u5c06\u6570\u636e\u5e93\u7684\u66f4\u6539\u8f6c\u6362\u4e3a\u4e8b\u4ef6\u6d41\u7684\u5206\u5e03\u5f0f\u5e73\u53f0\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u4ee5\u884c\u7ea7\u522b\u68c0\u67e5\u5bf9 MySQL \u7684\u66f4\u65b0\uff08\u4ee5 JSON \u683c\u5f0f\uff09\u7684\u60c5\u51b5\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"err\">\uff5e\u7701\u7565\uff5e<\/span>\r\n  <span class=\"nl\">\"payload\"<\/span><span class=\"p\">:<\/span> <span class=\"p\">{<\/span>\r\n    <span class=\"nl\">\"before\"<\/span><span class=\"p\">:<\/span> <span class=\"p\">{<\/span>\r\n      <span class=\"nl\">\"id\"<\/span><span class=\"p\">:<\/span> <span class=\"mi\">100<\/span><span class=\"p\">,<\/span>\r\n      <span class=\"nl\">\"first_name\"<\/span><span class=\"p\">:<\/span> <span class=\"s2\">\"Oliver\"<\/span><span class=\"p\">,<\/span>\r\n      <span class=\"nl\">\"last_name\"<\/span><span class=\"p\">:<\/span> <span class=\"s2\">\"Jack\"<\/span><span class=\"p\">,<\/span>\r\n      <span class=\"nl\">\"email\"<\/span><span class=\"p\">:<\/span> <span class=\"s2\">\"jack@test.com\"<\/span>\r\n    <span class=\"p\">},<\/span>\r\n    <span class=\"nl\">\"after\"<\/span><span class=\"p\">:<\/span> <span class=\"p\">{<\/span>\r\n      <span class=\"nl\">\"id\"<\/span><span class=\"p\">:<\/span> <span class=\"mi\">100<\/span><span class=\"p\">,<\/span>\r\n      <span class=\"nl\">\"first_name\"<\/span><span class=\"p\">:<\/span> <span class=\"s2\">\"Oliver\"<\/span><span class=\"p\">,<\/span>\r\n      <span class=\"nl\">\"last_name\"<\/span><span class=\"p\">:<\/span> <span class=\"s2\">\"Harry\"<\/span><span class=\"p\">,<\/span>\r\n      <span class=\"nl\">\"email\"<\/span><span class=\"p\">:<\/span> <span class=\"s2\">\"harry@test.com\"<\/span>\r\n    <span class=\"p\">}<\/span>\r\n<span class=\"err\">\uff5e\u7701\u7565\uff5e<\/span>\r\n<\/code><\/pre>\n<p>Debezium \u662f\u5728 Apache Kafka \u57fa\u7840\u4e0a\u5b9e\u73b0\u7684\uff0c\u5b83\u5c06\u6570\u636e\u53d8\u66f4\u7684\u5386\u53f2\u8bb0\u5f55\u5728 Kafka \u65e5\u5fd7\u4e2d\u3002\u5373\u4f7f\u5e94\u7528\u7a0b\u5e8f\u505c\u6b62\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u91cd\u65b0\u542f\u52a8\u6765\u786e\u8ba4\u4ece\u4e2d\u65ad\u7684\u4e8b\u4ef6\u4e2d\u7684\u53d8\u66f4\u3002<br \/>\n\u6b64\u5916\uff0c\u5b83\u8fd8\u652f\u6301\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u5305\u62ec MySQL\u3001PostgreSQL\u3001MongoDB\u3001SQL Server\u3001Oracle \u7b49\u3002<\/p>\n<p>\u56e0\u4e3a\u6709\u6559\u7a0b\uff0c\u6240\u4ee5\u6211\u5c1d\u8bd5\u4e86\u4e00\u4e0b\u3002<br \/>\nhttps:\/\/debezium.io\/documentation\/reference\/0.9\/tutorial.html<\/p>\n<p>\u7531\u4e8e\u6559\u7a0b\u5185\u5bb9\u8f83\u957f\uff0c\u6211\u6253\u7b97\u5c3d\u53ef\u80fd\u5730\u7b80\u5316\u5199\u4f5c\u3002<br \/>\n\u8be5\u6559\u7a0b\u6d89\u53ca\u83b7\u53d6 MySQL \u7684\u53d8\u66f4\u6570\u636e\u5185\u5bb9\u3002<\/p>\n<h4>\u6267\u884c\u73af\u5883<\/h4>\n<p>\u5728\u4f7f\u7528 AWS EC2 Linux2 \u4e4b\u524d\uff0c\u9700\u8981\u5148\u5b89\u88c5 Docker\u3002<\/p>\n<h1>\u5b89\u88c5<\/h1>\n<p>Debezium\u6709\u4e09\u4e2a\u4e3b\u8981\u7ec4\u4ef6\uff0c\u5206\u522b\u662fZooKeeper\u3001Kafka\u548cDebezium\u8fde\u63a5\u5668\u670d\u52a1\u3002\u4e3a\u4e86\u786e\u8ba4\u5176\u529f\u80fd\uff0c\u6bcf\u6b21\u4f7f\u7528docker run\u547d\u4ee4\u90fd\u9700\u8981\u542f\u52a8\u4e00\u4e2a\u65b0\u7684\u7ec8\u7aef\u3002\u901a\u8fc7\u5728docker run\u547d\u4ee4\u4e2d\u6307\u5b9a-it\u9009\u9879\uff0c\u53ef\u4ee5\u5728\u7ec8\u7aef\u4e0a\u4ee5\u4ea4\u4e92\u6a21\u5f0f\u663e\u793a\u5185\u5bb9\u3002\u6b64\u5916\uff0c\u901a\u8fc7\u6307\u5b9a&#8211;rm\u9009\u9879\uff0c\u5f53\u6559\u7a0b\u7ed3\u675f\u5e76\u505c\u6b62\u65f6\uff0c\u5bb9\u5668\u5c06\u88ab\u5220\u9664\u3002<\/p>\n<h4>\u542f\u52a8\u52a8\u7269\u56ed\u7ba1\u7406\u5458<\/h4>\n<p>Zookeeper\u662f\u7528\u4e8e\u6784\u5efa\u5206\u5e03\u5f0f\u5904\u7406\u7cfb\u7edf\u7684\u4e2d\u95f4\u4ef6\u3002<br \/>\nKafka\u53ef\u4ee5\u5728\u591a\u4e2aKafka\u670d\u52a1\u5668\u4e0a\u7ec4\u6210\u96c6\u7fa4\uff0c\u800cZookeeper\u7528\u4e8e\u534f\u8c03\u5404\u4e2aKafka\u670d\u52a1\u5668\u3002<\/p>\n<pre class=\"post-pre\"><code>docker run -it --rm --name zookeeper -p 2181:2181 -p 2888:2888 -p 3888:3888 debezium\/zookeeper:0.9\r\n<\/code><\/pre>\n<h4>\u5361\u592b\u5361\u542f\u52a8<\/h4>\n<p>Kafka \u662f\u4e00\u79cd\u5206\u5e03\u5f0f\u6d88\u606f\u961f\u5217\uff0c\u5b83\u662f\u7528\u4e8e\u4e34\u65f6\u6570\u636e\u5b58\u50a8\u7684\u4e2d\u95f4\u4ef6\u3002<\/p>\n<pre class=\"post-pre\"><code>docker run -it --rm --name kafka -p 9092:9092 --link zookeeper:zookeeper debezium\/kafka:0.9\r\n<\/code><\/pre>\n<h4>\u542f\u52a8MySQL<\/h4>\n<p>MySQL \u662f\u4e00\u79cd\u5173\u7cfb\u578b\u6570\u636e\u5e93\u3002<br \/>\n\u672c\u6b21\u6211\u4eec\u4f1a\u4f7f\u7528\u5df2\u7ecf\u521b\u5efa\u597d\u4e86\u7684\u8868\u7b49\uff0c\u7528\u4e8e\u6559\u7a0b\u6f14\u793a\u3002<\/p>\n<pre class=\"post-pre\"><code>docker run -it --rm --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=debezium -e MYSQL_USER=mysqluser -e MYSQL_PASSWORD=mysqlpw debezium\/example-mysql:0.9\r\n<\/code><\/pre>\n<h4>\u542f\u52a8MySQL\u547d\u4ee4\u884c\u5ba2\u6237\u7aef<\/h4>\n<p>\u4e3a\u4e86\u64cd\u4f5cMySQL\uff0c\u6211\u4eec\u542f\u52a8\u547d\u4ee4\u884c\u5ba2\u6237\u7aef\u3002<\/p>\n<pre class=\"post-pre\"><code>docker run -it --rm --name mysqlterm --link mysql --rm mysql:5.7 sh -c 'exec mysql -h\"$MYSQL_PORT_3306_TCP_ADDR\" -P\"$MYSQL_PORT_3306_TCP_PORT\" -uroot -p\"$MYSQL_ENV_MYSQL_ROOT_PASSWORD\"'\r\n<\/code><\/pre>\n<p>\u5728 MySQL \u547d\u4ee4\u884c\u5ba2\u6237\u7aef\u4e2d\uff0c\u6267\u884c\u547d\u4ee4 &#8220;use inventory;&#8221;\uff0c\u7136\u540e\u6267\u884c\u547d\u4ee4 &#8220;show tables;&#8221;\uff0c\u60a8\u5c06\u53d1\u73b0\u8868\u5df2\u7ecf\u5b58\u5728\u3002<\/p>\n<h4>\u5f00\u542f Kafka Connect<\/h4>\n<p>Kafka Connect\u662f\u7528\u4e8e\u5728Kafka\u548c\u5468\u8fb9\u7cfb\u7edf\u4e4b\u95f4\u8fdb\u884c\u6d41\u6570\u636e\u4ea4\u6362\u7684\u901a\u4fe1\u534f\u8bae\u3001\u5e93\u548c\u5de5\u5177\u3002<\/p>\n<pre class=\"post-pre\"><code>docker run -it --rm --name connect -p 8083:8083 -e GROUP_ID=1 -e CONFIG_STORAGE_TOPIC=my_connect_configs -e OFFSET_STORAGE_TOPIC=my_connect_offsets -e STATUS_STORAGE_TOPIC=my_connect_statuses --link zookeeper:zookeeper --link kafka:kafka --link mysql:mysql debezium\/connect:0.9\r\n<\/code><\/pre>\n<p>\u8fd0\u884ccurl-h&#8221;Accept:application\/json&#8221;localhost:8083\/\u5982\u679c\u8fd4\u56de\u503c\uff0c\u5219\u8bf4\u660eKafka Connect REST API\u5df2\u7ecf\u542f\u52a8\u3002<\/p>\n<h4>MySQL \u76d1\u63a7 (MySQL<\/h4>\n<p>\u8bbe\u7f6e\u4ece\u8fde\u63a5\u5668\u5230DB\u548cKafka\u8fde\u63a5\u6240\u9700\u7684\u4fe1\u606f\u3002<\/p>\n<pre class=\"post-pre\"><code>curl -i -X POST -H \"Accept:application\/json\" -H \"Content-Type:application\/json\" localhost:8083\/connectors\/ -d '{ \"name\": \"inventory-connector\", \"config\": { \"connector.class\": \"io.debezium.connector.mysql.MySqlConnector\", \"tasks.max\": \"1\", \"database.hostname\": \"mysql\", \"database.port\": \"3306\", \"database.user\": \"debezium\", \"database.password\": \"dbz\", \"database.server.id\": \"184054\", \"database.server.name\": \"dbserver1\", \"database.whitelist\": \"inventory\", \"database.history.kafka.bootstrap.servers\": \"kafka:9092\", \"database.history.kafka.topic\": \"dbhistory.inventory\" } }'\r\n<\/code><\/pre>\n<p>\u786e\u4fdd\u663e\u793aHTTP\/1.1 201 Created\u3002<\/p>\n<p>\u786e\u8ba4\u5df2\u901a\u8fc7\u547d\u4ee4\u8fdb\u884c\u8bbe\u7f6e\u3002<\/p>\n<pre class=\"post-pre\"><code>curl -i -X GET -H \"Accept:application\/json\" localhost:8083\/connectors\/inventory-connector\r\n<\/code><\/pre>\n<p>\u4ee5\u4e0a\u5373\u4e3a\u8bbe\u7f6e\u5b8c\u6210\u3002<\/p>\n<h1>\u8cc7\u6599\u4fee\u6539\u65f6\u7684\u64cd\u4f5c\u786e\u8ba4<\/h1>\n<p>\u6211\u4f1a\u5c1d\u8bd5\u4fee\u6539MySQL\u7684\u6570\u636e\u5e76\u67e5\u770b\u662f\u5426\u53ef\u4ee5\u83b7\u53d6\u5230\u66f4\u6539\u540e\u7684\u5185\u5bb9\u3002<\/p>\n<p>\u4e3a\u4e86\u68c0\u67e5 Kafka \u662f\u5426\u6536\u5230\u4e86\u6d88\u606f\uff0c\u6211\u4eec\u5c06\u542f\u52a8\u4e00\u4e2a\u76d1\u542c\u5668\u3002<\/p>\n<pre class=\"post-pre\"><code>docker run -it --name watcher --rm --link zookeeper:zookeeper --link kafka:kafka debezium\/kafka:0.9 watch-topic -a -k dbserver1.inventory.customers\r\n<\/code><\/pre>\n<p>\u7531\u4e8e\u5728\u521d\u6b21\u8fde\u63a5\u65f6\u9700\u8981\u8bfb\u53d6\u81ea\u8868\u683c\u521b\u5efa\u4ee5\u6765\u7684\u6240\u6709\u66f4\u6539\uff0c\u56e0\u6b64\u6240\u6709\u6570\u636e\u90fd\u5c06\u663e\u793a\u4e3a\u66f4\u6539\u6570\u636e\u3002\u4ece\u4e0b\u4e00\u6b21\u5f00\u59cb\uff0c\u5c06\u4ece\u5df2\u8bfb\u53d6\u7684\u65e5\u5fd7\u7ee7\u7eed\u8bfb\u53d6\u3002<\/p>\n<pre class=\"post-pre\"><code>WARNING: Using default BROKER_ID=1, which is valid only for non-clustered installations.\r\nUsing ZOOKEEPER_CONNECT=172.17.0.2:2181\r\nUsing KAFKA_ADVERTISED_LISTENERS=PLAINTEXT:\/\/172.17.0.7:9092\r\nUsing KAFKA_BROKER=172.17.0.3:9092\r\nContents of topic dbserver1.inventory.customers:\r\n{\"schema\":{\"type\":\"struct\",\"fields\":[{\"type\":\"int32\",\"optional\":false,\"field\":\"id\"}],\"optional\":false,\"name\":\"dbserver1.inventory.customers.Key\"},\"payload\":{\"id\":1001}}        {\"schema\":{\"type\":\"struct\",\"fields\":[{\"type\":\"struct\",\"fields\":[{\"type\":\"int32\",\"optional\":false,\"field\":\"id\"},{\"type\":\"string\",\"optional\":false,\"field\":\"first_name\"},{\"type\":\"string\",\"optional\":false,\"field\":\"last_name\"},{\"type\":\"string\",\"optional\":false,\"field\":\"email\"}],\"optional\":true,\"name\":\"dbserver1.inventory.customers.Value\",\"field\":\"before\"},{\"type\":\"struct\",\"fields\":[{\"type\":\"int32\",\"optional\":false,\"field\":\"id\"},{\"type\":\"string\",\"optional\":false,\"field\":\"first_name\"},{\"type\":\"string\",\"optional\":false,\"field\":\"last_name\"},{\"type\":\"string\",\"optional\":false,\"field\":\"email\"}],\"optional\":true,\"name\":\"dbserver1.inventory.customers.Value\",\"field\":\"after\"},{\"type\":\"struct\",\"fields\":[{\"type\":\"string\",\"optional\":true,\"field\":\"version\"},{\"type\":\"string\",\"optional\":true,\"field\":\"connector\"},{\"type\":\"string\",\"optional\":false,\"field\":\"name\"},{\"type\":\"int64\",\"optional\":false,\"field\":\"server_id\"},{\"type\":\"int64\",\"optional\":false,\"field\":\"ts_sec\"},{\"type\":\"string\",\"optional\":true,\"field\":\"gtid\"},{\"type\":\"string\",\"optional\":false,\"field\":\"file\"},{\"type\":\"int64\",\"optional\":false,\"field\":\"pos\"},{\"type\":\"int32\",\"optional\":false,\"field\":\"row\"},{\"type\":\"boolean\",\"optional\":true,\"default\":false,\"field\":\"snapshot\"},{\"type\":\"int64\",\"optional\":true,\"field\":\"thread\"},{\"type\":\"string\",\"optional\":true,\"field\":\"db\"},{\"type\":\"string\",\"optional\":true,\"field\":\"table\"},{\"type\":\"string\",\"optional\":true,\"field\":\"query\"}],\"optional\":false,\"name\":\"io.debezium.connector.mysql.Source\",\"field\":\"source\"},{\"type\":\"string\",\"optional\":false,\"field\":\"op\"},{\"type\":\"int64\",\"optional\":true,\"field\":\"ts_ms\"}],\"optional\":false,\"name\":\"dbserver1.inventory.customers.Envelope\"},\"payload\":{\"before\":null,\"after\":{\"id\":1001,\"first_name\":\"Sally\",\"last_name\":\"Thomas\",\"email\":\"sally.thomas@acme.com\"},\"source\":{\"version\":\"0.9.5.Final\",\"connector\":\"mysql\",\"name\":\"dbserver1\",\"server_id\":0,\"ts_sec\":0,\"gtid\":null,\"file\":\"mysql-bin.000003\",\"pos\":154,\"row\":0,\"snapshot\":true,\"thread\":null,\"db\":\"inventory\",\"table\":\"customers\",\"query\":null},\"op\":\"c\",\"ts_ms\":1569744224564}}\r\n{\"schema\":{\"type\":\"struct\",\"fields\":[{\"type\":\"int32\",\"optional\":false,\"field\":\"id\"}],\"optional\":false,\"name\":\"dbserver1.inventory.customers.Key\"},\"payload\":{\"id\":1002}}        {\"schema\":{\"type\":\"struct\",\"fields\":[{\"type\":\"struct\",\"fields\":[{\"type\":\"int32\",\"optional\":false,\"field\":\"id\"},{\"type\":\"string\",\"optional\":false,\"field\":\"first_name\"},{\"type\":\"string\",\"optional\":false,\"field\":\"last_name\"},{\"type\":\"string\",\"optional\":false,\"field\":\"email\"}],\"optional\":true,\"name\":\"dbserver1.inventory.customers.Value\",\"field\":\"before\"},{\"type\":\"struct\",\"fields\":[{\"type\":\"int32\",\"optional\":false,\"field\":\"id\"},{\"type\":\"string\",\"optional\":false,\"field\":\"first_name\"},{\"type\":\"string\",\"optional\":false,\"field\":\"last_name\"},{\"type\":\"string\",\"optional\":false,\"field\":\"email\"}],\"optional\":true,\"name\":\"dbserver1.inventory.customers.Value\",\"field\":\"after\"},{\"type\":\"struct\",\"fields\":[{\"type\":\"string\",\"optional\":true,\"field\":\"version\"},{\"type\":\"string\",\"optional\":true,\"field\":\"connector\"},{\"type\":\"string\",\"optional\":false,\"field\":\"name\"},{\"type\":\"int64\",\"optional\":false,\"field\":\"server_id\"},{\"type\":\"int64\",\"optional\":false,\"field\":\"ts_sec\"},{\"type\":\"string\",\"optional\":true,\"field\":\"gtid\"},{\"type\":\"string\",\"optional\":false,\"field\":\"file\"},{\"type\":\"int64\",\"optional\":false,\"field\":\"pos\"},{\"type\":\"int32\",\"optional\":false,\"field\":\"row\"},{\"type\":\"boolean\",\"optional\":true,\"default\":false,\"field\":\"snapshot\"},{\"type\":\"int64\",\"optional\":true,\"field\":\"thread\"},{\"type\":\"string\",\"optional\":true,\"field\":\"db\"},{\"type\":\"string\",\"optional\":true,\"field\":\"table\"},{\"type\":\"string\",\"optional\":true,\"field\":\"query\"}],\"optional\":false,\"name\":\"io.debezium.connector.mysql.Source\",\"field\":\"source\"},{\"type\":\"string\",\"optional\":false,\"field\":\"op\"},{\"type\":\"int64\",\"optional\":true,\"field\":\"ts_ms\"}],\"optional\":false,\"name\":\"dbserver1.inventory.customers.Envelope\"},\"payload\":{\"before\":null,\"after\":{\"id\":1002,\"first_name\":\"George\",\"last_name\":\"Bailey\",\"email\":\"gbailey@foobar.com\"},\"source\":{\"version\":\"0.9.5.Final\",\"connector\":\"mysql\",\"name\":\"dbserver1\",\"server_id\":0,\"ts_sec\":0,\"gtid\":null,\"file\":\"mysql-bin.000003\",\"pos\":154,\"row\":0,\"snapshot\":true,\"thread\":null,\"db\":\"inventory\",\"table\":\"customers\",\"query\":null},\"op\":\"c\",\"ts_ms\":1569744224564}}\r\n{\"schema\":{\"type\":\"struct\",\"fields\":[{\"type\":\"int32\",\"optional\":false,\"field\":\"id\"}],\"optional\":false,\"name\":\"dbserver1.inventory.customers.Key\"},\"payload\":{\"id\":1003}}        {\"schema\":{\"type\":\"struct\",\"fields\":[{\"type\":\"struct\",\"fields\":[{\"type\":\"int32\",\"optional\":false,\"field\":\"id\"},{\"type\":\"string\",\"optional\":false,\"field\":\"first_name\"},{\"type\":\"string\",\"optional\":false,\"field\":\"last_name\"},{\"type\":\"string\",\"optional\":false,\"field\":\"email\"}],\"optional\":true,\"name\":\"dbserver1.inventory.customers.Value\",\"field\":\"before\"},{\"type\":\"struct\",\"fields\":[{\"type\":\"int32\",\"optional\":false,\"field\":\"id\"},{\"type\":\"string\",\"optional\":false,\"field\":\"first_name\"},{\"type\":\"string\",\"optional\":false,\"field\":\"last_name\"},{\"type\":\"string\",\"optional\":false,\"field\":\"email\"}],\"optional\":true,\"name\":\"dbserver1.inventory.customers.Value\",\"field\":\"after\"},{\"type\":\"struct\",\"fields\":[{\"type\":\"string\",\"optional\":true,\"field\":\"version\"},{\"type\":\"string\",\"optional\":true,\"field\":\"connector\"},{\"type\":\"string\",\"optional\":false,\"field\":\"name\"},{\"type\":\"int64\",\"optional\":false,\"field\":\"server_id\"},{\"type\":\"int64\",\"optional\":false,\"field\":\"ts_sec\"},{\"type\":\"string\",\"optional\":true,\"field\":\"gtid\"},{\"type\":\"string\",\"optional\":false,\"field\":\"file\"},{\"type\":\"int64\",\"optional\":false,\"field\":\"pos\"},{\"type\":\"int32\",\"optional\":false,\"field\":\"row\"},{\"type\":\"boolean\",\"optional\":true,\"default\":false,\"field\":\"snapshot\"},{\"type\":\"int64\",\"optional\":true,\"field\":\"thread\"},{\"type\":\"string\",\"optional\":true,\"field\":\"db\"},{\"type\":\"string\",\"optional\":true,\"field\":\"table\"},{\"type\":\"string\",\"optional\":true,\"field\":\"query\"}],\"optional\":false,\"name\":\"io.debezium.connector.mysql.Source\",\"field\":\"source\"},{\"type\":\"string\",\"optional\":false,\"field\":\"op\"},{\"type\":\"int64\",\"optional\":true,\"field\":\"ts_ms\"}],\"optional\":false,\"name\":\"dbserver1.inventory.customers.Envelope\"},\"payload\":{\"before\":null,\"after\":{\"id\":1003,\"first_name\":\"Edward\",\"last_name\":\"Walker\",\"email\":\"ed@walker.com\"},\"source\":{\"version\":\"0.9.5.Final\",\"connector\":\"mysql\",\"name\":\"dbserver1\",\"server_id\":0,\"ts_sec\":0,\"gtid\":null,\"file\":\"mysql-bin.000003\",\"pos\":154,\"row\":0,\"snapshot\":true,\"thread\":null,\"db\":\"inventory\",\"table\":\"customers\",\"query\":null},\"op\":\"c\",\"ts_ms\":1569744224564}}\r\n{\"schema\":{\"type\":\"struct\",\"fields\":[{\"type\":\"int32\",\"optional\":false,\"field\":\"id\"}],\"optional\":false,\"name\":\"dbserver1.inventory.customers.Key\"},\"payload\":{\"id\":1004}}        {\"schema\":{\"type\":\"struct\",\"fields\":[{\"type\":\"struct\",\"fields\":[{\"type\":\"int32\",\"optional\":false,\"field\":\"id\"},{\"type\":\"string\",\"optional\":false,\"field\":\"first_name\"},{\"type\":\"string\",\"optional\":false,\"field\":\"last_name\"},{\"type\":\"string\",\"optional\":false,\"field\":\"email\"}],\"optional\":true,\"name\":\"dbserver1.inventory.customers.Value\",\"field\":\"before\"},{\"type\":\"struct\",\"fields\":[{\"type\":\"int32\",\"optional\":false,\"field\":\"id\"},{\"type\":\"string\",\"optional\":false,\"field\":\"first_name\"},{\"type\":\"string\",\"optional\":false,\"field\":\"last_name\"},{\"type\":\"string\",\"optional\":false,\"field\":\"email\"}],\"optional\":true,\"name\":\"dbserver1.inventory.customers.Value\",\"field\":\"after\"},{\"type\":\"struct\",\"fields\":[{\"type\":\"string\",\"optional\":true,\"field\":\"version\"},{\"type\":\"string\",\"optional\":true,\"field\":\"connector\"},{\"type\":\"string\",\"optional\":false,\"field\":\"name\"},{\"type\":\"int64\",\"optional\":false,\"field\":\"server_id\"},{\"type\":\"int64\",\"optional\":false,\"field\":\"ts_sec\"},{\"type\":\"string\",\"optional\":true,\"field\":\"gtid\"},{\"type\":\"string\",\"optional\":false,\"field\":\"file\"},{\"type\":\"int64\",\"optional\":false,\"field\":\"pos\"},{\"type\":\"int32\",\"optional\":false,\"field\":\"row\"},{\"type\":\"boolean\",\"optional\":true,\"default\":false,\"field\":\"snapshot\"},{\"type\":\"int64\",\"optional\":true,\"field\":\"thread\"},{\"type\":\"string\",\"optional\":true,\"field\":\"db\"},{\"type\":\"string\",\"optional\":true,\"field\":\"table\"},{\"type\":\"string\",\"optional\":true,\"field\":\"query\"}],\"optional\":false,\"name\":\"io.debezium.connector.mysql.Source\",\"field\":\"source\"},{\"type\":\"string\",\"optional\":false,\"field\":\"op\"},{\"type\":\"int64\",\"optional\":true,\"field\":\"ts_ms\"}],\"optional\":false,\"name\":\"dbserver1.inventory.customers.Envelope\"},\"payload\":{\"before\":null,\"after\":{\"id\":1004,\"first_name\":\"Anne\",\"last_name\":\"Kretchmar\",\"email\":\"annek@noanswer.org\"},\"source\":{\"version\":\"0.9.5.Final\",\"connector\":\"mysql\",\"name\":\"dbserver1\",\"server_id\":0,\"ts_sec\":0,\"gtid\":null,\"file\":\"mysql-bin.000003\",\"pos\":154,\"row\":0,\"snapshot\":true,\"thread\":null,\"db\":\"inventory\",\"table\":\"customers\",\"query\":null},\"op\":\"c\",\"ts_ms\":1569744224564}}\r\n<\/code><\/pre>\n<h4>\u6570\u636e\u66f4\u65b0<\/h4>\n<p>\u6211\u5c06\u5c1d\u8bd5\u66f4\u65b0\u6570\u636e\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"n\">use<\/span> <span class=\"n\">inventory<\/span><span class=\"p\">;<\/span>\r\n<span class=\"k\">UPDATE<\/span> <span class=\"n\">customers<\/span> <span class=\"k\">SET<\/span> <span class=\"n\">first_name<\/span><span class=\"o\">=<\/span><span class=\"s1\">'Anne Marie'<\/span> <span class=\"k\">WHERE<\/span> <span class=\"n\">id<\/span><span class=\"o\">=<\/span><span class=\"mi\">1004<\/span><span class=\"p\">;<\/span>\r\n<\/code><\/pre>\n<details>{<br \/>\n&#8220;schema&#8221;: {<br \/>\n&#8220;type&#8221;: &#8220;struct&#8221;,<br \/>\n&#8220;fields&#8221;: [<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;struct&#8221;,<br \/>\n&#8220;fields&#8221;: [<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;int32&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;id&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;first_name&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;last_name&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;email&#8221;<br \/>\n}<br \/>\n],<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;name&#8221;: &#8220;dbserver1.inventory.customers.Value&#8221;,<br \/>\n&#8220;field&#8221;: &#8220;before&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;struct&#8221;,<br \/>\n&#8220;fields&#8221;: [<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;int32&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;id&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;first_name&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;last_name&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;email&#8221;<br \/>\n}<br \/>\n],<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;name&#8221;: &#8220;dbserver1.inventory.customers.Value&#8221;,<br \/>\n&#8220;field&#8221;: &#8220;after&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;struct&#8221;,<br \/>\n&#8220;fields&#8221;: [<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;field&#8221;: &#8220;version&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;field&#8221;: &#8220;connector&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;name&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;int64&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;server_id&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;int64&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;ts_sec&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;field&#8221;: &#8220;gtid&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;file&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;int64&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;pos&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;int32&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;row&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;boolean&#8221;,<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;default&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;snapshot&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;int64&#8221;,<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;field&#8221;: &#8220;thread&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;field&#8221;: &#8220;db&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;field&#8221;: &#8220;table&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;field&#8221;: &#8220;query&#8221;<br \/>\n}<br \/>\n],<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;name&#8221;: &#8220;io.debezium.connector.mysql.Source&#8221;,<br \/>\n&#8220;field&#8221;: &#8220;source&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;op&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;int64&#8221;,<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;field&#8221;: &#8220;ts_ms&#8221;<br \/>\n}<br \/>\n],<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;name&#8221;: &#8220;dbserver1.inventory.customers.Envelope&#8221;<br \/>\n},<br \/>\n&#8220;payload&#8221;: {<br \/>\n&#8220;before&#8221;: {<br \/>\n&#8220;id&#8221;: 1004,<br \/>\n&#8220;first_name&#8221;: &#8220;Anne&#8221;,<br \/>\n&#8220;last_name&#8221;: &#8220;Kretchmar&#8221;,<br \/>\n&#8220;email&#8221;: &#8220;annek@noanswer.org&#8221;<br \/>\n},<br \/>\n&#8220;after&#8221;: {<br \/>\n&#8220;id&#8221;: 1004,<br \/>\n&#8220;first_name&#8221;: &#8220;Anne Marie&#8221;,<br \/>\n&#8220;last_name&#8221;: &#8220;Kretchmar&#8221;,<br \/>\n&#8220;email&#8221;: &#8220;annek@noanswer.org&#8221;<br \/>\n},<br \/>\n&#8220;source&#8221;: {<br \/>\n&#8220;version&#8221;: &#8220;0.9.5.Final&#8221;,<br \/>\n&#8220;connector&#8221;: &#8220;mysql&#8221;,<br \/>\n&#8220;name&#8221;: &#8220;dbserver1&#8221;,<br \/>\n&#8220;server_id&#8221;: 223344,<br \/>\n&#8220;ts_sec&#8221;: 1569745138,<br \/>\n&#8220;gtid&#8221;: null,<br \/>\n&#8220;file&#8221;: &#8220;mysql-bin.000003&#8221;,<br \/>\n&#8220;pos&#8221;: 364,<br \/>\n&#8220;row&#8221;: 0,<br \/>\n&#8220;snapshot&#8221;: false,<br \/>\n&#8220;thread&#8221;: 2,<br \/>\n&#8220;db&#8221;: &#8220;inventory&#8221;,<br \/>\n&#8220;table&#8221;: &#8220;customers&#8221;,<br \/>\n&#8220;query&#8221;: null<br \/>\n},<br \/>\n&#8220;op&#8221;: &#8220;u&#8221;,<br \/>\n&#8220;ts_ms&#8221;: 1569745138230<br \/>\n}<br \/>\n}\u51fa\u529b\u7d50\u679c:<br \/>\n{<br \/>\n&#8220;schema&#8221;: {<br \/>\n&#8220;type&#8221;: &#8220;struct&#8221;,<br \/>\n&#8220;fields&#8221;: [<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;struct&#8221;,<br \/>\n&#8220;fields&#8221;: [<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;int32&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;id&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;first_name&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;last_name&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;email&#8221;<br \/>\n}<br \/>\n],<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;name&#8221;: &#8220;dbserver1.inventory.customers.Value&#8221;,<br \/>\n&#8220;field&#8221;: &#8220;before&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;struct&#8221;,<br \/>\n&#8220;fields&#8221;: [<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;int32&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;id&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;first_name&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;last_name&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;email&#8221;<br \/>\n}<br \/>\n],<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;name&#8221;: &#8220;dbserver1.inventory.customers.Value&#8221;,<br \/>\n&#8220;field&#8221;: &#8220;after&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;struct&#8221;,<br \/>\n&#8220;fields&#8221;: [<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;field&#8221;: &#8220;version&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;field&#8221;: &#8220;connector&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;name&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;int64&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;server_id&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;int64&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;ts_sec&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;field&#8221;: &#8220;gtid&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;file&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;int64&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;pos&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;int32&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;row&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;boolean&#8221;,<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;default&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;snapshot&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;int64&#8221;,<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;field&#8221;: &#8220;thread&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;field&#8221;: &#8220;db&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;field&#8221;: &#8220;table&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;field&#8221;: &#8220;query&#8221;<br \/>\n}<br \/>\n],<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;name&#8221;: &#8220;io.debezium.connector.mysql.Source&#8221;,<br \/>\n&#8220;field&#8221;: &#8220;source&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;string&#8221;,<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;field&#8221;: &#8220;op&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;type&#8221;: &#8220;int64&#8221;,<br \/>\n&#8220;optional&#8221;: true,<br \/>\n&#8220;field&#8221;: &#8220;ts_ms&#8221;<br \/>\n}<br \/>\n],<br \/>\n&#8220;optional&#8221;: false,<br \/>\n&#8220;name&#8221;: &#8220;dbserver1.inventory.customers.Envelope&#8221;<br \/>\n},<br \/>\n&#8220;payload&#8221;: {<br \/>\n&#8220;before&#8221;: {<br \/>\n&#8220;id&#8221;: 1004,<br \/>\n&#8220;first_name&#8221;: &#8220;Anne&#8221;,<br \/>\n&#8220;last_name&#8221;: &#8220;Kretchmar&#8221;,<br \/>\n&#8220;email&#8221;: &#8220;annek@noanswer.org&#8221;<br \/>\n},<br \/>\n&#8220;after&#8221;: {<br \/>\n&#8220;id&#8221;: 1004,<br \/>\n&#8220;first_name&#8221;: &#8220;Anne Marie&#8221;,<br \/>\n&#8220;last_name&#8221;: &#8220;Kretchmar&#8221;,<br \/>\n&#8220;email&#8221;: &#8220;annek@noanswer.org&#8221;<br \/>\n},<br \/>\n&#8220;source&#8221;: {<br \/>\n&#8220;version&#8221;: &#8220;0.9.5.Final&#8221;,<br \/>\n&#8220;connector&#8221;: &#8220;mysql&#8221;,<br \/>\n&#8220;name&#8221;: &#8220;dbserver1&#8221;,<br \/>\n&#8220;server_id&#8221;: 223344,<br \/>\n&#8220;ts_sec&#8221;: 1569745138,<br \/>\n&#8220;gtid&#8221;: null,<br \/>\n&#8220;file&#8221;: &#8220;mysql-bin.000003&#8221;,<br \/>\n&#8220;pos&#8221;: 364,<br \/>\n&#8220;row&#8221;: 0,<br \/>\n&#8220;snapshot&#8221;: false,<br \/>\n&#8220;thread&#8221;: 2,<br \/>\n&#8220;db&#8221;: &#8220;inventory&#8221;,<br \/>\n&#8220;table&#8221;: &#8220;customers&#8221;,<br \/>\n&#8220;query&#8221;: null<br \/>\n},<br \/>\n&#8220;op&#8221;: &#8220;u&#8221;,<br \/>\n&#8220;ts_ms&#8221;: 1569745138230<br \/>\n}<br \/>\n}<\/p>\n<\/details>\n<p>\u7531\u4e8e\u5b9e\u884c\u7ed3\u679c\u8fc7\u957f\uff0c\u53ea\u6458\u5f55\u4e86\u90e8\u5206\u3002\u53ef\u4ee5\u770b\u51fa\u5df2\u83b7\u53d6\u5230\u53d8\u66f4\u524d\u540e\u7684\u6570\u636e\u3002<\/p>\n<pre class=\"post-pre\"><code>    \"payload\": {\r\n        \"before\": {\r\n            \"id\": 1004,\r\n            \"first_name\": \"Anne\",\r\n            \"last_name\": \"Kretchmar\",\r\n            \"email\": \"annek@noanswer.org\"\r\n        },\r\n        \"after\": {\r\n            \"id\": 1004,\r\n            \"first_name\": \"Anne Marie\",\r\n            \"last_name\": \"Kretchmar\",\r\n            \"email\": \"annek@noanswer.org\"\r\n        },\r\n<\/code><\/pre>\n<h1>\u6700\u540e<\/h1>\n<p>\u5b8c\u6210\u6559\u7a0b\u540e\uff0c\u6839\u636e\u9700\u8981\u505c\u6b62\u5728Docker\u4e2d\u542f\u52a8\u7684\u6bcf\u4e2a\u670d\u52a1\u3002<br \/>\n\u7531\u4e8e\u5728\u8fd0\u884cdocker\u65f6\u6307\u5b9a\u4e86\u9009\u9879&#8211;rm\uff0c\u6240\u4ee5\u505c\u6b62\u540e\u5c06\u4f1a\u88ab\u5220\u9664\u3002<\/p>\n<pre class=\"post-pre\"><code>docker stop mysqlterm watcher connect mysql kafka zookeeper\r\n<\/code><\/pre>\n<p>\u786e\u8ba4\u6ca1\u6709\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b\u7136\u540e\u5b8c\u6210\u3002<\/p>\n<pre class=\"post-pre\"><code>docker ps -a\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u9996\u5148 Debezium \u662f\u4e00\u4e2a\u53ef\u4ee5\u5c06\u6570\u636e\u5e93\u7684\u66f4\u6539\u8f6c\u6362\u4e3a\u4e8b\u4ef6\u6d41\u7684\u5206\u5e03\u5f0f\u5e73\u53f0\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u4ee5\u884c\u7ea7\u522b\u68c0\u67e5\u5bf9 MySQ [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-46920","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528Debezium\u4eceMySQL\u4e2d\u83b7\u53d6\u53d8\u66f4\u6570\u636e - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528debezium\u4ecemysql\u4e2d\u83b7\u53d6\u53d8\u66f4\u6570\u636e\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528Debezium\u4eceMySQL\u4e2d\u83b7\u53d6\u53d8\u66f4\u6570\u636e\" \/>\n<meta property=\"og:description\" content=\"\u9996\u5148 Debezium \u662f\u4e00\u4e2a\u53ef\u4ee5\u5c06\u6570\u636e\u5e93\u7684\u66f4\u6539\u8f6c\u6362\u4e3a\u4e8b\u4ef6\u6d41\u7684\u5206\u5e03\u5f0f\u5e73\u53f0\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u4ee5\u884c\u7ea7\u522b\u68c0\u67e5\u5bf9 MySQ [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528debezium\u4ecemysql\u4e2d\u83b7\u53d6\u53d8\u66f4\u6570\u636e\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-02-22T15:17:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-15T04:14:14+00:00\" \/>\n<meta name=\"author\" content=\"\u6587, \u7fd4\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6587, \u7fd4\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8debezium%e4%bb%8emysql%e4%b8%ad%e8%8e%b7%e5%8f%96%e5%8f%98%e6%9b%b4%e6%95%b0%e6%8d%ae%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8debezium%e4%bb%8emysql%e4%b8%ad%e8%8e%b7%e5%8f%96%e5%8f%98%e6%9b%b4%e6%95%b0%e6%8d%ae%e3%80%82\/\",\"name\":\"\u4f7f\u7528Debezium\u4eceMySQL\u4e2d\u83b7\u53d6\u53d8\u66f4\u6570\u636e - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-02-22T15:17:54+00:00\",\"dateModified\":\"2024-01-15T04:14:14+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8debezium%e4%bb%8emysql%e4%b8%ad%e8%8e%b7%e5%8f%96%e5%8f%98%e6%9b%b4%e6%95%b0%e6%8d%ae%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8debezium%e4%bb%8emysql%e4%b8%ad%e8%8e%b7%e5%8f%96%e5%8f%98%e6%9b%b4%e6%95%b0%e6%8d%ae%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8debezium%e4%bb%8emysql%e4%b8%ad%e8%8e%b7%e5%8f%96%e5%8f%98%e6%9b%b4%e6%95%b0%e6%8d%ae%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528Debezium\u4eceMySQL\u4e2d\u83b7\u53d6\u53d8\u66f4\u6570\u636e\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c\",\"name\":\"\u6587, \u7fd4\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g\",\"caption\":\"\u6587, \u7fd4\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/wenxiang\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8debezium%e4%bb%8emysql%e4%b8%ad%e8%8e%b7%e5%8f%96%e5%8f%98%e6%9b%b4%e6%95%b0%e6%8d%ae%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528Debezium\u4eceMySQL\u4e2d\u83b7\u53d6\u53d8\u66f4\u6570\u636e - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528debezium\u4ecemysql\u4e2d\u83b7\u53d6\u53d8\u66f4\u6570\u636e\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528Debezium\u4eceMySQL\u4e2d\u83b7\u53d6\u53d8\u66f4\u6570\u636e","og_description":"\u9996\u5148 Debezium \u662f\u4e00\u4e2a\u53ef\u4ee5\u5c06\u6570\u636e\u5e93\u7684\u66f4\u6539\u8f6c\u6362\u4e3a\u4e8b\u4ef6\u6d41\u7684\u5206\u5e03\u5f0f\u5e73\u53f0\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u4ee5\u884c\u7ea7\u522b\u68c0\u67e5\u5bf9 MySQ [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528debezium\u4ecemysql\u4e2d\u83b7\u53d6\u53d8\u66f4\u6570\u636e\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-02-22T15:17:54+00:00","article_modified_time":"2024-01-15T04:14:14+00:00","author":"\u6587, \u7fd4","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6587, \u7fd4","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"10 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8debezium%e4%bb%8emysql%e4%b8%ad%e8%8e%b7%e5%8f%96%e5%8f%98%e6%9b%b4%e6%95%b0%e6%8d%ae%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8debezium%e4%bb%8emysql%e4%b8%ad%e8%8e%b7%e5%8f%96%e5%8f%98%e6%9b%b4%e6%95%b0%e6%8d%ae%e3%80%82\/","name":"\u4f7f\u7528Debezium\u4eceMySQL\u4e2d\u83b7\u53d6\u53d8\u66f4\u6570\u636e - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-02-22T15:17:54+00:00","dateModified":"2024-01-15T04:14:14+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8debezium%e4%bb%8emysql%e4%b8%ad%e8%8e%b7%e5%8f%96%e5%8f%98%e6%9b%b4%e6%95%b0%e6%8d%ae%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8debezium%e4%bb%8emysql%e4%b8%ad%e8%8e%b7%e5%8f%96%e5%8f%98%e6%9b%b4%e6%95%b0%e6%8d%ae%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8debezium%e4%bb%8emysql%e4%b8%ad%e8%8e%b7%e5%8f%96%e5%8f%98%e6%9b%b4%e6%95%b0%e6%8d%ae%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528Debezium\u4eceMySQL\u4e2d\u83b7\u53d6\u53d8\u66f4\u6570\u636e"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c","name":"\u6587, \u7fd4","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g","caption":"\u6587, \u7fd4"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/wenxiang\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8debezium%e4%bb%8emysql%e4%b8%ad%e8%8e%b7%e5%8f%96%e5%8f%98%e6%9b%b4%e6%95%b0%e6%8d%ae%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/46920","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=46920"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/46920\/revisions"}],"predecessor-version":[{"id":59374,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/46920\/revisions\/59374"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=46920"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=46920"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=46920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}