2020-09-24 17:16:41 +02:00
// Category: debezium-using
// Type: assembly
2020-10-05 18:24:44 +02:00
[id="debezium-connector-for-mysql"]
= {prodname} connector for MySQL
2020-10-13 22:59:09 +02:00
:context: mysql
2021-12-06 13:04:15 +01:00
:data-collection: table
2023-03-04 00:24:39 +01:00
:database-port: 3306
2021-08-28 02:00:36 +02:00
:mbean-name: {context}
2021-12-10 21:16:05 +01:00
:connector-file: {context}
:connector-class: MySql
2021-12-14 05:45:56 +01:00
:connector-name: MySQL
2023-03-30 22:56:58 +02:00
:include-list-example: inventory.*
2024-08-02 18:24:59 +02:00
:MYSQL:
2020-10-05 18:24:44 +02:00
ifdef::community[]
2020-04-13 22:33:59 +02:00
:toc:
:toc-placement: macro
:linkattrs:
:icons: font
:source-highlighter: highlight.js
2020-10-05 18:24:44 +02:00
toc::[]
2022-03-26 06:20:43 +01:00
endif::community[]
2019-10-17 11:45:42 +02:00
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=mariadb-mysql-intro]
2020-09-24 17:16:41 +02:00
// Type: assembly
// ModuleID: how-debezium-mysql-connectors-work
// Title: How {prodname} MySQL connectors work
[[how-the-mysql-connector-works]]
== How the connector works
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=how-connector-works-intro]
2020-10-05 18:24:44 +02:00
// Type: concept
// ModuleID: mysql-topologies-supported-by-debezium-connectors
// Title: MySQL topologies supported by {prodname} connectors
[id="supported-mysql-topologies"]
=== Supported MySQL topologies
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=supported-topos]
2020-10-05 18:24:44 +02:00
2020-09-25 23:24:55 +02:00
// Type: concept
2020-10-01 18:35:56 +02:00
// Title: How {prodname} MySQL connectors handle database schema changes
2020-09-25 23:24:55 +02:00
[[mysql-schema-history-topic]]
2020-10-01 18:35:56 +02:00
=== Schema history topic
2020-09-25 23:24:55 +02:00
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=schema-history]
2020-09-25 23:24:55 +02:00
// Type: concept
2020-10-01 18:35:56 +02:00
// Title: How {prodname} MySQL connectors expose database schema changes
[id="mysql-schema-change-topic"]
2020-09-25 23:24:55 +02:00
=== Schema change topic
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=schema-change]
2020-09-25 23:24:55 +02:00
// Type: concept
// Title: How {prodname} MySQL connectors perform database snapshots
[[mysql-snapshots]]
=== Snapshots
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=snapshots]
2023-07-31 08:46:25 +02:00
// Type: concept
2024-07-04 01:30:11 +02:00
[id="mysql-initial-snapshot-workflow-with-global-read-lock"]
2023-07-31 08:46:25 +02:00
==== Initial snapshots that use a global read lock
2023-10-05 04:02:18 +02:00
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=initial-snap-global]
2023-07-31 08:46:25 +02:00
// Type: concept
2024-07-04 01:30:11 +02:00
[id="mysql-initial-snapshot-workflow-with-table-level-locks"]
2023-07-31 08:46:25 +02:00
==== Initial snapshots that use table-level locks
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=initial-snap-table-lock]
2024-02-22 15:24:48 +01:00
2023-10-05 04:02:18 +02:00
// ModuleID: mysql-description-of-why-initial-snapshots-capture-the-schema-history-for-all-tables
2023-07-31 08:46:25 +02:00
// Title: Description of why initial snapshots capture the schema history for all tables
// Type: concept
[id="understanding-why-initial-snapshots-capture-the-schema-history-for-all-tables"]
==== Understanding why initial snapshots capture the schema history for all tables
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=why-snapshot-captures-history-all]
2023-07-31 08:46:25 +02:00
// Type: procedure
[id="mysql-capturing-data-from-tables-not-captured-by-the-initial-snapshot-no-schema-change"]
==== Capturing data from tables not captured by the initial snapshot (no schema change)
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=cap-tbls-not-in-initial-no-schema-chg]
2023-07-31 08:46:25 +02:00
// Type: procedure
[id="mysql-capturing-data-from-new-tables-with-schema-changes"]
==== Capturing data from tables not captured by the initial snapshot (schema change)
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=cap-tbls-not-in-initial-schema-chg]
2023-07-31 08:46:25 +02:00
2021-12-18 06:01:47 +01:00
// Type: concept
2024-07-04 01:30:11 +02:00
[id="debezium-mysql-ad-hoc-snapshots"]
2023-10-05 04:02:18 +02:00
=== Ad hoc snapshots
2021-12-18 06:01:47 +01:00
2023-10-05 04:02:18 +02:00
include::{partialsdir}/modules/all-connectors/con-connector-ad-hoc-snapshots.adoc[leveloffset=+1]
2021-12-18 06:01:47 +01:00
2023-10-05 04:02:18 +02:00
// Type: assembly
// ModuleID: debezium-mysql-incremental-snapshots
2023-10-10 00:14:21 +02:00
[id="debezium-mysql-incremental-snapshots"]
2023-10-05 04:02:18 +02:00
=== Incremental snapshots
2023-10-03 23:43:15 +02:00
include::{partialsdir}/modules/all-connectors/con-connector-incremental-snapshot.adoc[leveloffset=+1]
2021-12-18 02:24:24 +01:00
2022-11-23 04:15:38 +01:00
// Type: procedure
2023-10-05 04:02:18 +02:00
// ModuleID: debezium-mysql-triggering-an-incremental-snapshot
2022-11-23 04:15:38 +01:00
[id="mysql-triggering-an-incremental-snapshot"]
==== Triggering an incremental snapshot
2023-10-03 23:43:15 +02:00
include::{partialsdir}/modules/all-connectors/proc-triggering-an-incremental-snapshot-sql.adoc[leveloffset=+1]
// Type: procedure
2023-10-05 04:02:18 +02:00
// ModuleID: debezium-mysql-using-the-kafka-signaling-channel-to-trigger-an-incremental-snapshot
2023-10-03 23:43:15 +02:00
[id="mysql-triggering-an-incremental-snapshot-kafka"]
==== Using the Kafka signaling channel to trigger an incremental snapshot
2023-10-05 04:02:18 +02:00
2023-10-03 23:43:15 +02:00
include::{partialsdir}/modules/all-connectors/proc-triggering-an-incremental-snapshot-kafka.adoc[leveloffset=+1]
2022-11-23 04:15:38 +01:00
// Type: procedure
2023-10-05 04:02:18 +02:00
// ModuleID: debezium-mysql-stopping-an-incremental-snapshot
2022-11-23 04:15:38 +01:00
[id="mysql-stopping-an-incremental-snapshot"]
==== Stopping an incremental snapshot
2023-10-03 23:43:15 +02:00
include::{partialsdir}/modules/all-connectors/proc-stopping-an-incremental-snapshot-sql.adoc[leveloffset=+1]
// Type: procedure
2023-10-05 03:37:28 +02:00
// ModuleID: debezium-mysql-using-the-kafka-signaling-channel-to-stop-an-incremental-snapshot
[id="mysql-stopping-an-incremental-snapshot-kafka"]
2023-10-03 23:43:15 +02:00
==== Using the Kafka signaling channel to stop an incremental snapshot
2023-10-05 03:37:28 +02:00
2023-10-03 23:43:15 +02:00
include::{partialsdir}/modules/all-connectors/proc-stopping-an-incremental-snapshot-kafka.adoc[leveloffset=+1]
2021-12-18 06:01:47 +01:00
ifdef::community[]
[id="mysql-read-only-incremental-snapshots"]
2021-12-17 04:34:41 +01:00
==== Read-only incremental snapshots
2021-05-31 06:28:08 +02:00
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=readonly-incremental]
2021-08-28 05:42:37 +02:00
2021-12-17 04:34:41 +01:00
==== Ad hoc read-only incremental snapshots
2021-08-28 05:42:37 +02:00
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=adhoc-ro-incremental]
2022-08-02 17:14:51 +02:00
2021-02-18 12:39:44 +01:00
// Type: continue
[id="mysql-snapshot-events"]
2021-12-17 04:34:41 +01:00
=== Operation type of snapshot events
The MySQL connector emits snapshot events as `READ` operations `("op" : "r")`.
If you prefer that the connector emits snapshot events as `CREATE` (`c`) events, configure the {prodname} `ReadToInsertEvent` single message transform (SMT) to modify the event type.
2021-02-18 12:39:44 +01:00
2021-12-17 04:34:41 +01:00
The following example shows how to configure the SMT:
2021-02-18 12:39:44 +01:00
2021-12-17 04:34:41 +01:00
.Example: Using the `ReadToInsertEvent` SMT to change the type of snapshot events
2021-02-18 12:39:44 +01:00
----
transforms=snapshotasinsert,...
transforms.snapshotasinsert.type=io.debezium.connector.mysql.transforms.ReadToInsertEvent
----
endif::community[]
2024-02-22 15:24:48 +01:00
ifdef::community[]
[[connector-custom-snapshot]]
=== Custom snapshotter SPI
include::{partialsdir}/modules/all-connectors/custom-snapshotter-spi.adoc[leveloffset=+3]
endif::community[]
2023-07-31 18:06:19 +02:00
// Type: concept
[id="mysql-blocking-snapshots"]
2024-02-22 15:24:48 +01:00
=== Blocking snapshots
2023-07-31 18:06:19 +02:00
include::{partialsdir}/modules/all-connectors/con-connector-blocking-snapshot.adoc[leveloffset=+3]
2020-09-25 23:24:55 +02:00
// Type: concept
// Title: Default names of Kafka topics that receive {prodname} MySQL change event records
[[mysql-topic-names]]
=== Topic names
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=topic-names]
2021-10-08 23:48:22 +02:00
2021-02-17 20:23:19 +01:00
[[mysql-transaction-metadata]]
=== Transaction metadata
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=trans-meta]
2020-09-25 23:24:55 +02:00
// Type: assembly
// ModuleID: descriptions-of-debezium-mysql-connector-data-change-events
// Title: Descriptions of {prodname} MySQL connector data change events
[[mysql-events]]
== Data change events
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=data-chg-events]
2020-09-25 23:24:55 +02:00
// Type: concept
// ModuleID: about-keys-in-debezium-mysql-change-events
2021-05-03 18:35:52 +02:00
// Title: About keys in {prodname} MySQL change events
2020-09-25 23:24:55 +02:00
[[mysql-change-event-keys]]
=== Change event keys
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=event-keys]
2020-09-25 23:24:55 +02:00
// Type: concept
// ModuleID: about-values-in-debezium-mysql-change-events
// Title: About values in {prodname} MySQL change events
[[mysql-change-event-values]]
=== Change event values
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=event-values]
2020-09-25 23:24:55 +02:00
// Type: continue
[id="mysql-create-events"]
=== _create_ events
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=create-events]
2020-09-25 23:24:55 +02:00
// Type: continue
[id="mysql-update-events"]
=== _update_ events
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=update-events]
2020-09-25 23:24:55 +02:00
// Type: continue
[id="mysql-primary-key-updates"]
=== Primary key updates
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=pkey-updates]
2020-09-25 23:24:55 +02:00
// Type: continue
[id="mysql-delete-events"]
=== _delete_ events
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=del-events]
2020-09-25 23:24:55 +02:00
// Type: continue
[id="mysql-tombstone-events"]
2020-10-01 18:35:56 +02:00
=== Tombstone events
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=tombstone-events]
2020-09-25 23:24:55 +02:00
2022-10-09 10:47:15 +02:00
// Type: continue
[id="mysql-truncate-events"]
=== _truncate_ events
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=truncate-events]
2022-10-09 10:47:15 +02:00
2020-09-25 23:24:55 +02:00
// Type: reference
// ModuleID: how-debezium-mysql-connectors-map-data-types
// Title: How {prodname} MySQL connectors map data types
[[mysql-data-types]]
== Data type mappings
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=data-type-mappings]
2020-09-25 23:24:55 +02:00
2024-07-04 01:30:11 +02:00
[id="mysql-basic-types"]
=== Basic types
2020-09-25 23:24:55 +02:00
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=basic-data-types]
2020-09-25 23:24:55 +02:00
2024-07-04 01:30:11 +02:00
.
[id="mysql-temporal-types"]
=== Temporal types
2022-05-10 03:47:22 +02:00
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=temporal-data-types]
2020-09-25 23:24:55 +02:00
2024-07-04 01:30:11 +02:00
[id="mysql-decimal-types"]
=== Decimal types
2020-09-25 23:24:55 +02:00
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=decimal-data-types]
2020-09-25 23:24:55 +02:00
2024-07-04 01:30:11 +02:00
[id="mysql-boolean-values"]
=== Boolean values
2020-09-25 23:24:55 +02:00
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=boolean-values]
2020-09-25 23:24:55 +02:00
2024-07-04 01:30:11 +02:00
[id="mysql-spatial-types"]
=== Spatial types
2020-09-25 23:24:55 +02:00
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=spatial-data-types]
2020-09-25 23:24:55 +02:00
2024-07-04 01:30:11 +02:00
// Type: concept
// Title: Custom converters for mapping {connector-name} data to alternative data types
[id="debezium-mysql-connector-converters"]
2024-04-08 17:51:50 +02:00
== Custom converters
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=custom-converters]
2024-04-08 17:51:50 +02:00
=== `TINYINT(1)` to Boolean
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=tinyint-boolean-conv]
2024-04-08 17:51:50 +02:00
=== JDBC sink data types
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=jdbc-sink-data-types]
2024-04-08 17:51:50 +02:00
2020-09-25 23:24:55 +02:00
// Type: assembly
// ModuleID: setting-up-mysql-to-run-a-debezium-connector
// Title: Setting up MySQL to run a {prodname} connector
[[setting-up-mysql]]
2022-02-11 08:41:22 +01:00
== Setting up MySQL
2020-09-25 23:24:55 +02:00
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=setting-up-db]
2020-09-25 23:24:55 +02:00
// Type: procedure
// ModuleID: creating-a-mysql-user-for-a-debezium-connector
// Title: Creating a MySQL user for a {prodname} connector
[[mysql-creating-user]]
2021-02-16 01:45:07 +01:00
=== Creating a user
2020-09-25 23:24:55 +02:00
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=creating-a-db-user]
2020-09-24 17:16:41 +02:00
2020-09-25 23:24:55 +02:00
// Type: procedure
// ModuleID: enabling-the-mysql-binlog-for-debezium
// Title: Enabling the MySQL binlog for {prodname}
[[enable-mysql-binlog]]
2021-02-16 01:45:07 +01:00
=== Enabling the binlog
2020-09-24 17:16:41 +02:00
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=enabling-binlog]
2020-09-24 17:16:41 +02:00
2020-09-25 23:24:55 +02:00
// Type: procedure
// ModuleID: enabling-mysql-gtids-for-debezium
// Title: Enabling MySQL Global Transaction Identifiers for {prodname}
[[enable-mysql-gtids]]
=== Enabling GTIDs
2020-09-24 17:16:41 +02:00
2020-09-25 23:24:55 +02:00
Global transaction identifiers (GTIDs) uniquely identify transactions that occur on a server within a cluster. Though not required for a {prodname} MySQL connector, using GTIDs simplifies replication and enables you to more easily confirm if primary and replica servers are consistent.
2020-09-24 17:16:41 +02:00
2020-09-25 23:24:55 +02:00
GTIDs are available in MySQL 5.6.5 and later. See the link:https://dev.mysql.com/doc/refman/{mysql-version}/en/replication-options-gtids.html#option_mysqld_gtid-mode[MySQL documentation] for more details.
.Prerequisites
* A MySQL server.
* Basic knowledge of SQL commands.
* Access to the MySQL configuration file.
2020-09-24 17:16:41 +02:00
2020-09-25 23:24:55 +02:00
.Procedure
2020-09-24 17:16:41 +02:00
2020-09-25 23:24:55 +02:00
. Enable `gtid_mode`:
+
[source,SQL]
----
mysql> gtid_mode=ON
----
2020-09-24 17:16:41 +02:00
2020-09-25 23:24:55 +02:00
. Enable `enforce_gtid_consistency`:
+
[source,SQL]
----
mysql> enforce_gtid_consistency=ON
----
2020-09-24 17:16:41 +02:00
2020-09-25 23:24:55 +02:00
. Confirm the changes:
+
[source,SQL]
----
mysql> show global variables like '%GTID%';
----
2020-09-24 17:16:41 +02:00
2024-06-27 01:26:03 +02:00
+
2020-09-25 23:24:55 +02:00
.Result
[source,SQL]
----
+--------------------------+-------+
| Variable_name | Value |
+--------------------------+-------+
| enforce_gtid_consistency | ON |
| gtid_mode | ON |
+--------------------------+-------+
----
2020-09-24 17:16:41 +02:00
2024-06-27 01:26:03 +02:00
+
2020-09-25 23:24:55 +02:00
.Descriptions of GTID options
[cols="3,7",options="header",subs="+attributes"]
|===
|Option |Description
2020-09-24 17:16:41 +02:00
2020-09-25 23:24:55 +02:00
|`gtid_mode`
a|Boolean that specifies whether GTID mode of the MySQL server is enabled or not.
2020-09-24 17:16:41 +02:00
2020-09-25 23:24:55 +02:00
* `ON` = enabled
* `OFF` = disabled
2020-09-24 17:16:41 +02:00
2020-09-25 23:24:55 +02:00
|`enforce_gtid_consistency`
a|Boolean that specifies whether the server enforces GTID consistency by allowing the execution of statements that can be logged in a transactionally safe manner. Required when using GTIDs.
2020-09-24 17:16:41 +02:00
2020-09-25 23:24:55 +02:00
* `ON` = enabled
* `OFF` = disabled
2020-09-24 17:16:41 +02:00
2020-09-25 23:24:55 +02:00
|===
// Type: procedure
// ModuleID: configuring-mysql-session-timeouts-for-debezium
// Title: Configuring MySQL session timesouts for {prodname}
[[mysql-session-timeouts]]
=== Configuring session timeouts
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=cfg-session-timeouts]
2020-09-25 23:24:55 +02:00
// Type: procedure
// ModuleID: enabling-query-log-events-for-debezium-mysql-connectors
// Title: Enabling query log events for {prodname} MySQL connectors
[[enable-query-log-events]]
2021-02-16 01:45:07 +01:00
=== Enabling query log events
2020-09-25 23:24:55 +02:00
2024-03-20 15:52:54 +01:00
You might want to see the original `SQL` statement for each binlog event.
2024-05-30 00:29:31 +02:00
Enabling the `binlog_rows_query_log_events` option in the MySQL configuration file allows you to do this.
2020-09-25 23:24:55 +02:00
This option is available in MySQL 5.6 and later.
.Prerequisites
2020-09-24 17:16:41 +02:00
2020-09-25 23:24:55 +02:00
* A MySQL server.
2021-06-10 00:12:13 +02:00
* Basic knowledge of SQL commands.
2020-09-25 23:24:55 +02:00
* Access to the MySQL configuration file.
2020-09-24 17:16:41 +02:00
2020-09-25 23:24:55 +02:00
.Procedure
2020-09-24 17:16:41 +02:00
2024-05-30 00:29:31 +02:00
* Enable `binlog_rows_query_log_events` in MySQL:
2020-09-25 23:24:55 +02:00
+
[source,SQL]
----
mysql> binlog_rows_query_log_events=ON
----
+
2024-05-30 00:29:31 +02:00
`binlog_rows_query_log_events` is set to a value that enables/disables support for including the original `SQL` statement in the binlog entry.
2020-09-25 23:24:55 +02:00
+
** `ON` = enabled
** `OFF` = disabled
2020-09-24 17:16:41 +02:00
2022-09-22 14:26:46 +02:00
// Type: procedure
// ModuleID: validate-binlog-row-value-options-for-debezium-mysql-connectors
// Title: validate binlog row value options for {prodname} MySQL connectors
[[validate-binlog-row-value-options]]
=== Validating binlog row value options
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=validate-binlog-row-options]
2022-09-22 14:26:46 +02:00
2020-09-24 17:16:41 +02:00
// Type: assembly
2021-04-13 17:04:25 +02:00
// ModuleID: deployment-of-debezium-mysql-connectors
// Title: Deployment of {prodname} MySQL connectors
2020-09-24 17:16:41 +02:00
[[mysql-deploying-a-connector]]
== Deployment
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=deployment]
2021-04-13 17:04:25 +02:00
ifdef::product[]
2021-12-14 05:45:56 +01:00
// Type: concept
[id="openshift-streams-mysql-connector-deployment"]
=== MySQL connector deployment using {StreamsName}
2024-07-04 01:30:11 +02:00
2021-12-15 05:00:40 +01:00
include::{partialsdir}/modules/all-connectors/con-connector-streams-deployment.adoc[leveloffset=+1]
2021-12-14 05:45:56 +01:00
2024-07-04 01:30:11 +02:00
// Type: procedure
2021-12-15 05:00:40 +01:00
[id="using-streams-to-deploy-a-debezium-mysql-connector"]
2021-12-14 05:45:56 +01:00
=== Using {StreamsName} to deploy a {prodname} MySQL connector
2024-07-04 01:30:11 +02:00
2023-03-04 00:24:39 +01:00
include::{partialsdir}/modules/all-connectors/proc-using-streams-to-deploy-a-debezium-mysql-sqlserver-connector.adoc[leveloffset=+1]
2021-12-15 05:00:40 +01:00
2021-04-13 17:04:25 +02:00
// Type: procedure
// ModuleID: deploying-debezium-mysql-connectors
2021-12-15 05:00:40 +01:00
=== Deploying {prodname} MySQL connectors by building a custom Kafka Connect container image from a Dockerfile
2021-04-13 17:04:25 +02:00
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=deploy-via-dockerfile]
2021-04-13 17:04:25 +02:00
endif::product[]
2020-09-25 23:24:55 +02:00
2021-04-13 17:04:25 +02:00
ifdef::community[]
[[mysql-example-configuration]]
=== MySQL connector configuration example
endif::community[]
2020-09-25 23:24:55 +02:00
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=connector-config-example]
2020-09-25 23:24:55 +02:00
2021-04-13 17:04:25 +02:00
ifdef::community[]
[[mysql-adding-configuration]]
=== Adding connector configuration
endif::community[]
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=add-connector-cfg]
2020-09-25 23:24:55 +02:00
2021-12-14 05:45:56 +01:00
ifdef::product[]
// Type: procedure
[id="verifying-that-the-debezium-mysql-connector-is-running"]
=== Verifying that the {prodname} MySQL connector is running
2022-01-19 04:09:51 +01:00
include::{partialsdir}/modules/all-connectors/proc-verifying-the-connector-deployment.adoc[leveloffset=+1]
2022-01-18 19:21:07 +01:00
endif::product[]
2021-12-14 05:45:56 +01:00
2020-09-25 23:24:55 +02:00
// Type: reference
2022-08-25 23:15:39 +02:00
// Title: Descriptions of {prodname} MySQL connector configuration properties
2020-09-25 23:24:55 +02:00
[[mysql-connector-properties]]
=== Connector properties
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=connector-props-intro]
2020-09-25 23:24:55 +02:00
2020-10-01 18:35:56 +02:00
[id="mysql-required-connector-configuration-properties"]
2021-06-10 00:12:13 +02:00
==== Required {prodname} MySQL connector configuration properties
2021-08-03 22:01:31 +02:00
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/ref-mariadb-mysql-rqd-connector-cfg-props.adoc[leveloffset=+1]
2020-09-25 23:24:55 +02:00
2020-10-01 18:35:56 +02:00
[id="mysql-advanced-connector-configuration-properties"]
2024-07-04 01:30:11 +02:00
==== Advanced {prodname} MySQL connector configuration properties
2024-02-22 15:24:48 +01:00
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/ref-mariadb-mysql-adv-connector-cfg-props.adoc[leveloffset=+1]
2020-09-25 23:24:55 +02:00
2024-07-04 01:30:11 +02:00
/
2021-12-15 05:00:40 +01:00
[id="debezium-mysql-connector-database-history-configuration-properties"]
2022-08-17 16:34:50 +02:00
==== {prodname} connector database schema history configuration properties
2020-09-25 23:24:55 +02:00
2021-06-10 00:12:13 +02:00
include::{partialsdir}/modules/all-connectors/ref-connector-configuration-database-history-properties.adoc[leveloffset=+1]
2020-09-25 23:24:55 +02:00
2021-08-28 05:42:37 +02:00
[id="debezium-{context}-connector-kafka-signals-configuration-properties"]
2021-12-17 04:34:41 +01:00
==== {prodname} connector Kafka signals configuration properties
2021-08-28 05:42:37 +02:00
2023-06-08 12:06:27 +02:00
include::{partialsdir}/modules/all-connectors/ref-connector-pass-through-kafka-signals-configuration-properties.adoc[leveloffset=+1]
2021-08-28 05:42:37 +02:00
2023-06-08 12:06:27 +02:00
[id="debezium-{context}-connector-kafka-notifications-configuration-properties"]
2023-06-09 10:30:37 +02:00
==== {prodname} connector sink notifications configuration properties
2021-08-28 05:42:37 +02:00
2023-06-08 12:06:27 +02:00
include::{partialsdir}/modules/all-connectors/ref-connector-pass-through-kafka-notification-configuration-properties.adoc[leveloffset=+1]
2021-08-28 05:42:37 +02:00
2021-06-10 00:12:13 +02:00
[id="debezium-{context}-connector-pass-through-database-driver-configuration-properties"]
==== {prodname} connector pass-through database driver configuration properties
2020-09-24 17:16:41 +02:00
2021-06-10 00:12:13 +02:00
include::{partialsdir}/modules/all-connectors/ref-connector-pass-through-database-driver-configuration-properties.adoc[leveloffset=+1]
2020-09-24 17:16:41 +02:00
// Type: assembly
// ModuleID: monitoring-debezium-mysql-connector-performance
// Title: Monitoring {prodname} MySQL connector performance
[[mysql-monitoring]]
== Monitoring
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=monitoring-intro]
2020-09-24 17:16:41 +02:00
2024-04-24 23:20:33 +02:00
// Type: concept
// ModuleID: monitoring-debezium-mysql-connectors-customized-mbean-names
2024-06-24 20:10:56 +02:00
// Title: Customized names for MySQL connector snapshot and streaming MBean objects
2024-04-24 23:20:33 +02:00
=== Customized MBean names
include::{partialsdir}/modules/all-connectors/frag-common-mbean-name.adoc[leveloffset=+1,tags=mbeans-shared]
2020-09-24 17:16:41 +02:00
// Type: reference
// Title: Monitoring {prodname} during snapshots of MySQL databases
[[mysql-snapshot-metrics]]
=== Snapshot metrics
2022-06-10 22:17:42 +02:00
include::{partialsdir}/modules/all-connectors/frag-common-mbean-name.adoc[leveloffset=+1,tags=common-snapshot]
2020-09-24 17:16:41 +02:00
include::{partialsdir}/modules/all-connectors/ref-connector-monitoring-snapshot-metrics.adoc[leveloffset=+1]
2021-08-11 09:49:53 +02:00
include::{partialsdir}/modules/all-connectors/ref-connector-monitoring-incremental-snapshot-metrics.adoc[leveloffset=+1]
2020-09-24 17:16:41 +02:00
// Type: reference
2021-06-02 22:17:25 +02:00
// Title: Monitoring {prodname} MySQL connector record streaming
2021-06-01 06:29:47 +02:00
[[mysql-streaming-metrics]]
=== Streaming metrics
2020-09-24 17:16:41 +02:00
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=monitoring-intro]
2022-06-10 22:17:42 +02:00
include::{partialsdir}/modules/all-connectors/frag-common-mbean-name.adoc[leveloffset=+1,tags=common-streaming]
2020-09-24 17:16:41 +02:00
include::{partialsdir}/modules/all-connectors/ref-connector-monitoring-streaming-metrics.adoc[leveloffset=+1]
// Type: reference
// Title: Monitoring {prodname} MySQL connector schema history
[[mysql-schema-history-metrics]]
=== Schema history metrics
2020-04-13 22:33:59 +02:00
2020-09-24 17:16:41 +02:00
include::{partialsdir}/modules/all-connectors/ref-connector-monitoring-schema-history-metrics.adoc[leveloffset=+1]
2020-09-25 23:24:55 +02:00
2020-10-01 18:49:58 +02:00
// Type: concept
2020-09-25 23:24:55 +02:00
// Title: How {prodname} MySQL connectors handle faults and problems
[[mysql-when-things-go-wrong]]
== Behavior when things go wrong
2024-07-04 01:30:11 +02:00
include::{partialsdir}/modules/all-connectors/shared-mariadb-mysql.adoc[leveloffset=+1,tags=wrong-things]