Skip to main content

MySQL CDC reader

For an introduction to reading from MySQL, see MySQL.

Striim supports MySQL versions 5.5 and later.

Striim provides wizards for creating applications that read from MySQL and write to various targets. See Creating an application using a wizard for details.

MySQL setup

To use MySQLReader or MariaDBReader, an administrator with the necessary privileges must create a user for use by the adapter and assign it the necessary privileges:

CREATE USER 'striim' IDENTIFIED BY '******';
GRANT REPLICATION SLAVE ON *.* TO 'striim'@'%';
GRANT REPLICATION CLIENT ON *.* TO 'striim'@'%';
GRANT SELECT ON *.* TO 'striim'@'%';
  • The caching_sha2_password authentication plugin is not supported in this release. The mysql_native_password plugin is required.

  • The REPLICATION privileges must be granted on *.*. This is a limitation of MySQL.

  • You may use any other valid name in place of striim. Note that by default MySQL does not allow remote logins by root.

  • Replace ****** with a secure password.

  • You may narrow the SELECT statement to allow access only to those tables needed by your application. In that case, if other tables are specified in the source properties for the initial load application, Striim will return an error that they do not exist.

On-premise MySQL setup

MySQLReader reads from the MySQL binary log. If your MySQL server is using replication, the binary log is enabled, otherwise it may be disabled.

For on-premise MySQL, the property name for enabling the binary log, whether it is one or off by default, and how and where you change that setting vary depending on the operating system and your MySQL configuration, so for instructions see the binary log documentation for the version of MySQL you are running.

If the binary log is not enabled, Striim's attempts to read it will fail with errors such as the following:

Summary of the problem : Invalid binlog related database configuration
Potential root cause : The following global variables does not contain
 required configuration or it cannot be found:
 log_bin,server_id,binlog_format,binlog_row_image.
Suggested Actions: 1.Add --log_bin to the mysqld command line or add
 log_bin to your my.cnf file..
2.Add --server-id=n where n is a positive number to the mysqld command
 lineor add server-id=n to your my.cnf file..
3. Add --binlog-format=ROW to the mysqld command line or add 
 binlog-format=ROW to your my.cnf file..
4.Add --binlog_row_image=FULL to the mysqld command line or add
 binlog_row_image=FULL to your my.cnf file..
Component Name: MySQLSource.
Component Type: SOURCE.
Cause: Problem with configuration of MySQL
binlog_format should be ROW.
binlog_row_image should be FULL.
The server_id must be specified.
log_bin is not enabled.

On-premise MariaDB Xpand setup

See Configure MariaDB Xpand as a Replication Master. Set the global variables binlog_format to row and sql_log_bin to true.

Amazon Aurora for MySQL setup

See How do I enable binary logging for my Amazon Aurora MySQL cluster?.

Amazon RDS for MySQL setup

  1. Create a new parameter group for the database (see Creating a DB Parameter Group).

  2. Edit the parameter group, change binlog_format to row and binlog_row_image to full, and save the parameter group (see Modifying Parameters in a DB Parameter Group).

  3. Reboot the database instance (see Rebooting a DB Instance).

  4. In a database client, enter the following command to set the binlog retention period to one week:

    call mysql.rds_set_configuration('binlog retention hours', 168);

Azure Database for MySQL setup

You must create a read replica to enable binary logging. See Read replicas in Azure Database for MySQL.

Google Cloud SQL for MySQL setup

You must create a read replica to enable binary logging. See Cloud SQL> Documentation> MySQL> Guides > Create read replicas.

MySQL Reader properties

Before using one of these readers, the tasks described in MySQL setup must be completed.MySQL / MariaDB setup

When this reader is deployed to a Forwarding Agent, you must install the appropriate JDBC driver as described in Installing third-party drivers in the Forwarding Agent.

Striim provides wizards for creating applications that read from MySQL and write to various targets. See Creating an application using a wizard for details.

The adapter properties are:

property

type

default value

notes

Bidirectional Marker Table

String

When performing bidirectional replication, the fully qualified name of the marker table (see Bidirectional replication). This setting is case-sensitive.

CDDL Action

enum

Process

Visible in Flow Designer only when CDDL Capture is enabled. See Handling schema evolution.

Do not use Find and Replace DDL unless instructed to by Striim support.

CDDL Capture

Boolean

False

see Handling schema evolution.

Compression

Boolean

False

Set to True when the output of a MySQLReader source is the input of a Cassandra Writer target.

When replicating data from one MySQL instance to another, when a table contains a column of type FLOAT, updates and deletes may fail with messages in the log including "Could not find appropriate handler for SqlType." Setting Compression to True may resolve this issue. If the table's primary key is of type FLOAT, to resolve the issue you may need to change the primary key column type in MySQL.

Connection Retry Policy

String

retryInterval=30, maxRetries=3

With the default setting, if a connection attempt is unsuccessful, the adapter will try again in 30 seconds (retryInterval. If the second attempt is unsuccessful, in 30 seconds it will try a third time (maxRetries). If that is unsuccessful, the adapter will fail and log an exception. Negative values are not supported.

Connection URL

String

Specify mysql:// followed by the MySQL server's IP address or network name, optionally a colon and the port number (if not specified, port 3306 is used).

When connecting through an SSH tunnel (see Using an SSH tunnel to connect to a source or target), specify the IP address of the tunnel.

To use an Azure private endpoint to connect to Azure Database for MySQL, see Specifying Azure private endpoints in sources and targets.

Optionally, use the zeroDateTimeBehavior option (see MySQL Connector/J 8.1 Developer Guide / Connector/J Reference  / Configuration Properties / Datetime types processing / zeroDateTimeBehavior). with zeroDateTimeBehavior=CONVERT_TO_NULL, 0000-00-00 00:00:00 timestamps will be converted to nulls. With zeroDateTimeBehavior=EXCEPTION, when the input includes a 0000-00-00 00:00:00 timestamp, the application will halt. zeroDateTimeBehavior=ROUND is not supported.

Excluded Tables

String

Data for any tables specified here will not be returned. For example, if Tables uses a wildcard, data from any tables specified here will be omitted. Multiple table names (separated by semicolons) and wildcards may be used exactly as for Tables.

Filter Transaction Boundaries

Boolean

True

With the default value of True, begin and commit transactions are filtered out. Set to False to include begin and commit transactions.

Password

encrypted password

the password specified for the username (see Encrypted passwords)

Replace Invalid Date

String

MySQL Reader and MariaDB Xpand Reader only: if the source has DATE or DATETIME columns containing "zero" dates (0000-00-00 00:00:00 or 0000-00-00), specify a replacement date in the format YYYY-MMM-dd HH:mm:ss (see Joda-Time > Pattern-based formatting).

Send Before Image

Boolean

True

set to False to omit before data from output

Start Position

String

With the default value of null (blank), reading starts with transactions that are committed after the Striim application is started. To start from an earlier point, specify the name of the file and the offset for the start position, for example, FileName:clustrix-bin.000001;offset:720.

If your environment has multiple binlog files, specify the name of the one to use, for example, FileName:clustrix-bin.000001.

If you are using schema evolution (see Handling schema evolution, set a Start Position only if you are sure that there have been no DDL changes after that point.Handling schema evolution

When the application is recovered after a system failure, it will automatically resume from the point where it left off.

See also Switching from initial load to continuous replication.

Start Timestamp

String

NOW

With the default value of NOW, only new (based on current system time) transactions are read. If a timestamp is specified, transactions that began after that time are also read. The format is YYYY-MMM-DD HH:MM:SS. For example, to start at 5:00 pm on February 1, 2020, specify 2020-FEB-01 17:00:00.

If you are using schema evolution (see Handling schema evolution, set a Start Timestamp only if you are sure that there have been no DDL changes after that point.Handling schema evolution

When the application is recovered after a system failure, it will automatically resume from the point where it left off.

See also Switching from initial load to continuous replication.

Tables

String

The table(s) for which to return change data in the format <database>.<table>. Names are case-sensitive. You may specify multiple tables as a list separated by semicolons or with the following wildcards in the table name only (not in the database name):

  • %: any series of characters

  • _: any single character

For example, my.% would include all tables in the my database.

The % wildcard is allowed only at the end of the string. For example, mydb.prefix% is valid, but mydb.%suffix is not.

If any specified tables are missing Striim will issue a warning. If none of the specified tables exists, start will fail with a "found no tables" error.

Do not modify this property when CDDL Capture is True or recovery is enabled for the application.

Username

String

the login name for the user created as described in MariaDB setup

MySQL Reader WAEvent fields

The output data type for MySQLReader is WAEvent. The fields are:

metadata:

  • BinlogFile: the binlog file from which MySQL Reader read the operation

  • BinlogPosition: the operation's position in the binlog file

  • OperationName: BEGIN, INSERT, UPDATE, DELETE, COMMIT, STOP

    When schema evolution is enabled, OperationName for DDL events will be Alter, AlterColumns, Create, or Drop. This metadata is reserved for internal use by Striim and subject to change, so should not be used in CQs, open processors, or custom Java functions.

  • PK_UPDATE: for UPDATE only, true if the primary key value was changed, otherwise false

  • TxnID: unique transaction ID generated by MySQLReader (the internal MySQL transaction ID is not written to the MySQL binary log until the COMMIT operation)

  • TimeStamp: timestamp from the MySQL binary log

  • TableName: fully qualified name of the table (for INSERT, UPDATE, and DELETE only).

To retrieve the values for these fields, use the META function. See Parsing the fields of WAEvent for CDC readers.

data: an array of fields, numbered from 0, containing:

  • for a BEGIN operation, 0 is the current database name and 1 is BEGIN

  • for an INSERT or DELETE, the values that were inserted or deleted

  • for an UPDATE, the values after the operation was completed

  • for a COMMIT, 0 is the ID number of the transaction

  • for a DDL CREATE or DDL DROP, 0 is the current database name and 1 is the CREATE or DROP statement

To retrieve the values for these fields, use SELECT ... (DATA[]). See Parsing the fields of WAEvent for CDC readers.

before (for UPDATE operations only): the same format as data, but containing the values as they were prior to the UPDATE operation

dataPresenceBitMap, beforePresenceBitMap, and typeUUID are reserved and should be ignored.

MySQLReader simple application

The following application will write change data for the specified table to SysOut. Replace wauser and ****** with the user name and password for the MySQL account you created for use by MySQLReader (see MySQL setup) and mydb and mytable with the names of the database and table(s) to be read.

CREATE APPLICATION MySQLTest;

CREATE SOURCE MySQLCDCIn USING MySQLReader (
  Username:'striim',
  Password:'******',
  ConnectionURL:'mysql://192.168.1.10:3306',
  Database:'mydb',
  Tables:'mytable'
) 
OUTPUT TO MySQLCDCStream;

CREATE TARGET MySQLCDCOut
USING SysOut(name:MySQLCDC)
INPUT FROM MySQLCDCStream;

END APPLICATION MySQLTest;

MySQLReader example output

MySQLReader's output type is WAEvent. See WAEvent contents for change data for general information.

The following are examples of WAEvents emitted by MySQLReader for various operation types. They all use the following table:

CREATE TABLE POSAUTHORIZATIONS (BUSINESS_NAME varchar(30),
  MERCHANT_ID varchar(100),
  PRIMARY_ACCOUNT bigint,
  POS bigint,
  CODE varchar(20),
  EXP char(4),
  CURRENCY_CODE char(3),
  AUTH_AMOUNT decimal(10,3),
  TERMINAL_ID bigint,
  ZIP integer,
  CITY varchar(20));

INSERT

If you performed the following INSERT on the table:

INSERT INTO POSAUTHORIZATIONS VALUES(
  'COMPANY 1',
  'D6RJPwyuLXoLqQRQcOcouJ26KGxJSf6hgbu',
  6705362103919221351,
  0,
  '20130309113025',
  '0916',
  'USD',
  2.20,
  5150279519809946,
  41363,
  'Quicksand');

The WAEvent for that INSERT would be:

data: ["COMPANY 1","D6RJPwyuLXoLqQRQcOcouJ26KGxJSf6hgbu",6705362103919221351,0,"20130309113025",
    "0916","USD","2.200",5150279519809946,41363,"Quicksand"]
  metadata: {"BinlogFile":"ON.000004","TableName":"mydb.POSAUTHORIZATIONS",
    "TxnID":"1:000004:3559:1685955321000","OperationName":"INSERT","TimeStamp":1685955321000,
    "OPERATION_TS":1685955321000,"BinlogPosition":3727}
  userdata: null
  before: null
  dataPresenceBitMap: "fw8="
  beforePresenceBitMap: "AAA="
  typeUUID: {"uuidstring":"01ee037e-a8e6-6c61-a752-c2cd07892059"}

UPDATE

If you performed the following UPDATE on the table:

UPDATE POSAUTHORIZATIONS SET BUSINESS_NAME = 'COMPANY 5A' where pos=0;

The WAEvent for that UPDATE for the row created by the INSERT above would be:

data: ["COMPANY 5A","D6RJPwyuLXoLqQRQcOcouJ26KGxJSf6hgbu",6705362103919221351,0,
    "20130309113025","0916","USD","2.200",5150279519809946,41363,"Quicksand"]
  metadata: {"PK_UPDATE":"false","BinlogFile":"ON.000004",
    "TableName":"mydb.POSAUTHORIZATIONS","TxnID":"1:000004:3990:1685955341000",
    "OperationName":"UPDATE","TimeStamp":1685955341000,
    "OPERATION_TS":1685955341000,"BinlogPosition":4167}
  userdata: null
  before: ["COMPANY 1","D6RJPwyuLXoLqQRQcOcouJ26KGxJSf6hgbu",6705362103919221351,
    0,"20130309113025","0916","USD","2.200",5150279519809946,41363,"Quicksand"]
  dataPresenceBitMap: "fw8="
  beforePresenceBitMap: "fw8="
  typeUUID: {"uuidstring":"01ee037e-a8e6-6c61-a752-c2cd07892059"}

DELETE

If you performed the following DELETE on the table:

DELETE from POSAUTHORIZATIONS where pos=0;

The WAEvent for that DELETE for the row affected by the INSERT above would be:

data: ["COMPANY 5A","D6RJPwyuLXoLqQRQcOcouJ26KGxJSf6hgbu",6705362103919221351,0,
    "20130309113025","0916","USD","2.200",5150279519809946,41363,"Quicksand"]
  metadata: {"BinlogFile":"ON.000004","TableName":"mydb.POSAUTHORIZATIONS",
    "TxnID":"1:000004:4550:1685955350000","OperationName":"DELETE",
    "TimeStamp":1685955350000,"OPERATION_TS":1685955350000,"BinlogPosition":4718}
  userdata: null
  before: null
  dataPresenceBitMap: "fw8="
  beforePresenceBitMap: "AAA="
  typeUUID: {"uuidstring":"01ee037e-a8e6-6c61-a752-c2cd07892059"}

Note that the contents of data and before are reversed from what you might expect for a DELETE operation. This simplifies programming since you can get data for INSERT, UPDATE, and DELETE operations using only the data field.

MySQL Reader data type support and correspondence

MySQL type

TQL type

comments

BIGINT

long

BIGINT UNSIGNED

long

BINARY

string

BIT

long

BLOB

string

CHAR

string

DATE

org.joda.time.LocalDate

If the MySQL and Striim hosts are not in the same time zone, the value will be converted to Striim's time zone.

Dates prior to 1583 may be offset by several days due to the discontinuity in the switch from the Julian to Gregorian calendars (see What Calendar Is Used By MySQL?).

DATETIME

org.joda.time.DateTime

Fractional seconds, if used, are dropped. If the MySQL and Striim hosts are not in the same time zone, the value will be converted to Striim's time zone.

Dates prior to 1583 may be offset by several days due to the discontinuity in the switch from the Julian to Gregorian calendars (see What Calendar Is Used By MySQL?).

DECIMAL

string

DECIMAL UNSIGNED

string

DOUBLE

double

ENUM

int

The value is the integer that is MySQL's internal representation (enumeration literals are assigned numbers in the order the literals were written in the declaration).

FLOAT

float

If replicating from one MySQL database to another, see the notes for the Compression property in MySQL Reader properties.

geometry types

unsupported

INT

int

INT UNSIGNED

int

 

JSON

JSONNode

LONGBLOB

string

LONGTEXT

string

MEDIUMBLOB

string

MEDIUMINT

int

MEDIUMINT UNSIGNED

int

 

MEDIUMTEXT

string

NUMERIC

string

NUMERIC UNSIGNED

string

SET

long

The value is the integer that is MySQL's internal representation (the integer represented by the bit string in which the nth bit is set, if the nth member of the SET's literals is present in the set).

SMALLINT

short

SMALLINT UNSIGNED

short

 

spatial types

unsupported

TEXT

string

TIME

org.joda.time.LocalTime

Fractional seconds, if used, are dropped. If the MySQL and Striim hosts are not in the same time zone, the value will be converted to Striim's time zone.

TIMESTAMP

org.joda.time.DateTime

Fractional seconds, if used, are dropped. If the MySQL and Striim hosts are not in the same time zone, the value will be converted to Striim's time zone.

Appending ?zeroDateTimeBehavior=convertToNull to the connection URL will convert "zero" values (0000-00-00 00:00:00) to nulls (see Configuration Properties for Connector/J).

TINYBLOB

string

TINYINT

byte

TINYINT UNSIGNED

byte

 

TINYTEXT

string

VARBINARY

string

VARCHAR

string

YEAR

int

Known issue DEV-38452: for MySQL 8 or later, when a table also includes both a YEAR and an integer type, data may not be read and an onEventDeserializationFailure error will be written to the system log. In Striim 4.2.0.3 and earlier, reading will continue; in 4.2.0.4 and later, the application will terminate.

Target data type support & mapping for MariaDB and MySQL sources

The table below details how Striim maps the data types of a MariaDB or MySQL source to the data types of a target such as Azure Synapse, BigQuery, Databricks, and so on when you create an application using a wizard with Auto Schema Creation, perform an initial load using Database Reader with Create Schema enabled, or run the schema conversion utility, or when Striim schema evolution creates or alters target tables.

MySQL spatial types are not supported.

See Using Data Types from Other Database Engines for a list of supported data type aliases (such as boolean and numeric).

If your screen is not wide enough to display the whole table, click in a cell and drag left to view the right-hand columns.

MariaDB / MySQL Data Type

Azure Synapse

BigQuery

Databricks

Db2 for z/OS

Fabric Mirror

MariaDB

MySQL

Oracle

PostgreSQL

Snowflake

Spanner

Spanner PG Dialect

SQL Server

Yellowbrick

BIGINT UNSIGNED

numeric(38)

numeric

decimal(38)

bigint

long

bigint unsigned

bigint unsigned

int

double precision

integer

NUMERIC

float8

numeric(38)

decimal

BINARY

binary(p)

bytes(p)

binary

binary(255)

bytes

binary(p)

binary(p)

BLOB

bytea

BINARY

BYTES(p)

bytea

binary(p)

character varying(40000)

BINARY(p)

binary(p), if (p) <= 8000

binary, if (p) > 8000*

bytes, if (p) > 9223372036854775807*

bytes(p), if (p) <= 9223372036854775807

binary

binary(255), if (p) <= 127

blob, if (p) > 127*

bytes

binary(p), if (p) <= 255

binary(p), if (p) <= 255

BLOB

bytea, if (p) <= 2147483647

BINARY, if (p) <= 8388608

BINARY, if (p) > 8388608*

BYTES(MAX), if (p) > 10485760*

BYTES(p), if (p) <= 10485760

bytea, if (p) <= 1048576

binary(p), if (p) <= 8000

binary, if (p) > 8000*

character varying(40000)

BIT

BIT

bytes(p)

binary

binary(255)

bytes

bit(p)

bit(p)

BLOB

bit

BINARY

STRING(p)

bytea

BIT

character varying(p)

BIT(p)

varchar(p), if 1 <= (p) <= 8000

bytes(p), if (p) <= 9223372036854775807

binary

binary(255), if (p) <= 127

bytes

bit(p), if (p) <= 64

bit(p), if (p) <= 64

BLOB

bit varying(p), if 1 <= (p) <= 2147483647

BINARY, if (p) <= 8388608

STRING(p), if (p) <= 2621440

bytea, if (p) <= 1048576

varchar(p), if 1 <= (p) <= 8000

character varying(p), if (p) <= 64000

BLOB

varbinary(8000)

bytes(p)

binary

blob(p)

bytes

longblob

longblob

BLOB

bytea

BINARY

BYTES(p)

bytea

varbinary(max)

Not supported

CHAR

character(p)

string

string

character(p)

string

character(p)

character(p)

character(p)

character(p)

character(p)

STRING(p)

varchar(p)

character(p)

character(p)

CHAR(p)

character(p), if (p) <= 8000

varchar(8000), if (p) > 8000*

string

string

clob(p), if 255 <= (p) <= 2147483647*

character(p), if (p) <= 255

string

longtext, if 255 <= (p) <= 2147483647*

character(p), if (p) <= 255

longtext, if 255 <= (p) <= 2147483647*

character(p), if (p) <= 255

clob, if (p) > 2000*

character(p), if (p) <= 2000

character(p), if (p) <= 10485760

text, if (p) > 10485760*

character, if (p) > 16777216*

character(p), if (p) <= 16777216

STRING(p), if (p) <= 2621440

varchar(p), if (p) <= 1048576

text, if (p) > 1048576*

character(p), if (p) <= 8000

varchar(max), if (p) > 8000*

character(p), if (p) <= 64000

DATE

date

date

date

date

date

date

date

date

date

date

DATE

date

date

date

DATETIME

datetime2

datetime

timestamp

timestamp

timestamp-millis

datetime

datetime

timestamp

timestamp(s) without time zone

datetime

TIMESTAMP

timestamptz

datetime2

timestamp

DATETIME(s)

datetime2

datetime, if (s) <= 6

timestamp

timestamp

timestamp-millis

datetime

datetime

timestamp

timestamp(s) without time zone, if (p) <= 29, if (s) <= 6

datetime

TIMESTAMP

timestamptz, if (p) <= 36, if (s) <= 6

datetime2

timestamp

DECIMAL

numeric(p,s)

numeric

decimal(p,s)

numeric(p,s)

decimal

decimal(p,s)

decimal(p,s)

number(p,s)

numeric(p,s)

numeric(p,s)

NUMERIC

numeric

numeric(p,s)

decimal(p,s)

DECIMAL UNSIGNED

numeric(p,s)

numeric

decimal(p,s)

numeric(p,s)

decimal

decimal(p,s) unsigned

decimal(p,s) unsigned

numeric(p,s)

numeric(p,s)

numeric(p,s)

NUMERIC

numeric

numeric(p,s)

decimal(p,s)

DECIMAL UNSIGNED(p,0)

numeric(p,s), if (p) <= 38, if (s) <= 38

numeric, if (p) <= 29, if (s) <= 9

decimal(p,s), if (p) <= 38, if (s) <= 37

numeric(p,s), if (p) <= 31, if (s) <= 30

decimal, if (p) <= 38

decimal(p,s) unsigned, if (p) <= 65, if (s) <= 30

decimal(p,s) unsigned, if (p) <= 65, if (s) <= 30

numeric(p,s), if (p) <= 38, if (s) <= 127

numeric(p,s), if (p) <= 1000, if (s) <= 1000

numeric(p,s), if (p) <= 38, if (s) <= 37

NUMERIC, if (p) <= 38, if (s) <= 9

numeric, if (p) <= 131072, if (s) <= 16384

numeric(p,s), if (p) <= 38, if (s) <= 38

decimal(p,s), if (p) <= 38, if (s) <= 38

DECIMAL UNSIGNED(p,s)

varchar(8000), if (p,s) > 38, if (s) > 38*

numeric(p,s), if (p) <= 38, if (s) <= 38

string, if (p,s) > 39, if (s) > 38*

numeric, if (p) <= 29, if (s) <= 9

bignumeric, if 29 <= (p) <= 39, if 9 <= (s) <= 38

string, if (p,s) > 38, if (s) > 37*

decimal(p,s), if (p) <= 38, if (s) <= 37

numeric(p,s), if (p) <= 31, if (s) <= 30

numeric, if (p,s) > 31, if (s) > 30*

string, if (p,s) > 38*

decimal, if (p) <= 38

TEXT, if (p,s) > 65*

decimal(p,s) unsigned, if (p) <= 65, if (s) <= 30

TEXT, if (s) > 30*

TEXT, if (p,s) > 65*

decimal(p,s) unsigned, if (p) <= 65, if (s) <= 30

TEXT, if (s) > 30*

numeric(p,s), if (p) <= 38, if (s) <= 127

number, if (p,s) > 38, if (s) > 127*

double precision, if (s) > 1000

double precision, if (p,s) > 1000

numeric(p,s), if (p) <= 1000, if (s) <= 1000

numeric(p,s), if (p) <= 38, if (s) <= 37

STRING(MAX), if (p,s) > 308, if (s) > 15*

NUMERIC, if (p) <= 38, if (s) <= 9

FLOAT64, if 38 <= (p) <= 308, if 9 <= (s) <= 15

numeric, if (p) <= 131072, if (s) <= 16384

varchar(8000), if (p,s) > 38, if (s) > 38*

numeric(p,s), if (p) <= 38, if (s) <= 38

character varying, if (p,s) > 38, if (s) > 38*

decimal(p,s), if (p) <= 38, if (s) <= 38

DECIMAL(p,0)

numeric(p,s), if (p) <= 38, if (s) <= 38

numeric, if (p) <= 29, if (s) <= 9

decimal(p,s), if (p) <= 38, if (s) <= 37

numeric(p,s), if (p) <= 31, if (s) <= 30

decimal, if (p) <= 38

decimal(p,s), if (p) <= 65, if (s) <= 30

decimal(p,s), if (p) <= 65, if (s) <= 30

number(p,s), if (p) <= 38, if (s) <= 127

numeric(p,s), if (p) <= 1000, if (s) <= 1000

numeric(p,s), if (p) <= 38, if (s) <= 37

NUMERIC, if (p) <= 38, if (s) <= 9

numeric, if (p) <= 131072, if (s) <= 16384

numeric(p,s), if (p) <= 38, if (s) <= 38

decimal(p,s), if (p) <= 38, if (s) <= 38

DECIMAL(p,s)

varchar(8000), if (p,s) > 38, if (s) > 38*

numeric(p,s), if (p) <= 38, if (s) <= 38

string, if (p,s) > 39, if (s) > 38*

numeric, if (p) <= 29, if (s) <= 9

bignumeric, if 29 <= (p) <= 39, if 9 <= (s) <= 38

string, if (p,s) > 38, if (s) > 37*

decimal(p,s), if (p) <= 38, if (s) <= 37

numeric(p,s), if (p) <= 31, if (s) <= 30

numeric, if (p,s) > 31, if (s) > 30*

string, if (p,s) > 38*

decimal, if (p) <= 38

decimal(p,s), if (p) <= 65, if (s) <= 30

TEXT, if (p,s) > 65*

TEXT, if (s) > 30*

decimal(p,s), if (p) <= 65, if (s) <= 30

TEXT, if (p,s) > 65*

TEXT, if (s) > 30*

number, if (p,s) > 38, if (s) > 127*

number(p,s), if (p) <= 38, if (s) <= 127

double precision, if (s) > 1000

double precision, if (p,s) > 1000

numeric(p,s), if (p) <= 1000, if (s) <= 1000

numeric(p,s), if (p) <= 38, if (s) <= 37

VARCHAR, if (p,s) > 38, if (s) > 37*

STRING(MAX), if (p,s) > 308, if (s) > 15*

NUMERIC, if (p) <= 38, if (s) <= 9

FLOAT64, if 38 <= (p) <= 308, if 9 <= (s) <= 15

numeric, if (p) <= 131072, if (s) <= 16384

varchar(8000), if (p,s) > 38, if (s) > 38*

numeric(p,s), if (p) <= 38, if (s) <= 38

character varying, if (p,s) > 38, if (s) > 38*

decimal(p,s), if (p) <= 38, if (s) <= 38

DOUBLE

float

float64

double

double

double

double(p,s)

double(p,s)

double precision

double precision

double precision

FLOAT64

float8

float

double precision

DOUBLE(p,0)

float

float64

double

double

double

double(p,s), if (p) <= 255, if (s) <= 30

double(p,s), if (p) <= 255, if (s) <= 30

double precision, if (p) <= 126

double precision

double precision

FLOAT64, if (p) <= 308, if (s) <= 15

float8

float

double precision

DOUBLE(p,s)

float

float64

double

double

double

double, if (s) > 30*

double, if (p,s) > 255*

double(p,s), if (p) <= 255, if (s) <= 30

double, if (s) > 30*

double, if (p,s) > 255*

double(p,s), if (p) <= 255, if (s) <= 30

double precision, if (p) <= 126

double precision

double precision

STRING(MAX), if (p,s) > 308, if (s) > 15*

FLOAT64, if (p) <= 308, if (s) <= 15

float8

float

double precision

ENUM

varchar(8000)

string

string

varchar(250)

string

text

text

VARCHAR2(200)

character varying

VARCHAR

STRING(MAX)

text

varchar(8000)

character varying

FLOAT

float

float64

float

real

double

float

float

float

double precision

float

FLOAT64

float8

float

real

FLOAT(p,s)

float

float64

float

real, if (p) <= 76

double

float, if (p) <= 38, if (s) <= 30

double, if (p,s) > 38, if (s) > 30*

float, if (p) <= 38, if (s) <= 30

double, if (p,s) > 38, if (s) > 30*

float, if (p) <= 126

double precision

float

STRING(MAX), if (p,s) > 308, if (s) > 15*

FLOAT64, if (p) <= 308, if (s) <= 15

float8

float

real, if (p) <= 24

double precision, if (p,s) > 24*

GEOMETRY

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

INT

integer

int64

bigint

integer

int

integer

integer

int

integer

integer

INT64

int

integer

integer

INT UNSIGNED

integer

int64

bigint

integer

int

integer unsigned

integer unsigned

int

bigint

integer

INT64

int

integer

integer

JSON

varchar(8000)

string

string

clob

string

json

json

clob

json

VARIANT

STRING(MAX)

jsonb

varchar(max)

character varying

LONGBLOB

varbinary(8000)

bytes(p)

binary

blob(p)

bytes

longblob

longblob

BLOB

bytea

BINARY

BYTES(MAX)

Not supported

varbinary(max)

Not supported

LONGTEXT

varchar(8000)

string

string

clob(p)

string

LONGTEXT

LONGTEXT

clob

text

VARCHAR

STRING(MAX)

Not supported

varchar(max)

character varying

MEDIUMBLOB

varbinary(8000)

bytes(p)

binary

blob(p)

bytes

longblob

longblob

BLOB

bytea

BINARY

BYTES(MAX)

Not supported

varbinary(max)

Not supported

MEDIUMINT

integer

int64

bigint

integer

int

mediumint

mediumint

int

integer

integer

INT64

int

integer

integer

MEDIUMINT UNSIGNED

integer

int64

bigint

integer

int

mediumint unsigned

mediumint unsigned

int

integer

integer

INT64

int

integer

integer

MEDIUMTEXT

varchar(8000)

string

string

clob(p)

string

MEDIUMTEXT

MEDIUMTEXT

clob

text

VARCHAR

STRING(MAX)

Not supported

varchar(max)

character varying

SET

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

SMALLINT

smallint

int64

bigint

smallint

int

smallint

smallint

int

smallint

integer

INT64

int

smallint

smallint

SMALLINT UNSIGNED

smallint

int64

bigint

smallint

int

smallint unsigned

smallint unsigned

int

smallint

integer

INT64

int

smallint

smallint

TEXT

varchar(8000)

string

string

clob(p)

string

TEXT

TEXT

clob

text

VARCHAR

STRING(p)

text

varchar(max)

character varying

TIME

time

time

string

time

time-millis

time

time

VARCHAR2(150)

time

time

STRING(150)

varchar(150)

time

time

TIMESTAMP

datetime2

timestamp

timestamp

timestamp

timestamp-millis

datetime(s)

datetime(s)

timestamp(s)

timestamp(s) without time zone

timestamp

TIMESTAMP

timestamptz

datetime2

timestamp

TINYBLOB

varbinary(p)

bytes(p)

binary

blob(p)

bytes

longblob

longblob

BLOB

bytea

BINARY

BYTES(p)

bytea

varbinary(p)

character varying(p)

TINYINT

smallint

int64

bigint

smallint

int

tinyint

tinyint

int

smallint

integer

INT64

int

smallint

smallint

TINYINT UNSIGNED

tinyint

int64

bigint

smallint

int

tinyint unsigned

tinyint unsigned

int

smallint

integer

INT64

int

tinyint

smallint

TINYTEXT

varchar(p)

string

string

clob(p)

string

TINYTEXT

TINYTEXT

clob

text

VARCHAR

STRING(p)

text

varchar(p)

character varying(p)

VARBINARY(p)

varbinary(8000), if (p) > 8000*

varbinary(p), if (p) <= 8000

bytes, if (p) > 9223372036854775807*

bytes(p), if (p) <= 9223372036854775807

binary

blob, if (p) > 1011*

varbinary(4046), if (p) <= 1011

bytes

varbinary(65535), if (p) > 65535

varbinary(p), if (p) <= 65535

varbinary(65535), if (p) > 65535

varbinary(p), if (p) <= 65535

BLOB

bytea, if (p) <= 2147483647

bytea, if (p) > 2147483647*

VARBINARY

BYTES(MAX), if (p) > 10485760*

BYTES(p), if (p) <= 10485760

bytea, if (p) <= 1048576

bytea, if (p) > 1048576*

varbinary(max), if (p) > 8000*

varbinary(p), if (p) <= 8000

character varying, if (p) > 64000*

character varying(p), if (p) <= 64000

VARCHAR(p)

varchar(p), if (p) <= 8000

varchar(8000), if (p) > 8000*

string

string

varchar(p), if (p) <= 4045

clob(p), if 4045 <= (p) <= 2147483647

string

longtext, if 65535 <= (p) <= 2147483647*

varchar(p), if (p) <= 65535

longtext, if 65535 <= (p) <= 2147483647*

varchar(p), if (p) <= 65535

clob, if (p) > 4000*

VARCHAR2(p), if (p) <= 4000

character varying(p), if (p) <= 10485760

character varying, if (p) > 10485760*

VARCHAR, if (p) > 16777216*

VARCHAR(p), if (p) <= 16777216

STRING(MAX), if (p) > 2621440

STRING(p), if (p) <= 2621440

varchar(p), if (p) <= 1048576

text, if (p) > 1048576*

varchar(max), if (p) > 8000*

varchar(p), if (p) <= 8000

character varying, if (p) > 64000*

character varying(p), if (p) <= 64000

YEAR

integer

int64

bigint

integer

int

year

year

int

integer

numeric(38,0)

INT64

int8

integer

integer

*When using the schema conversion utility, these mappings appear in converted_tables_with_striim_intelligence.sql.

Runtime considerations when using MySQL Reader

If when connecting to MySQL 5.7 or earlier you get errors including javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate), append useSSL=false to the connection URL, for example:

ConnectionURL:'mysql://192.168.1.10:3306?useSSL=false'

The default value of MySQL's wait_timeout is 28800 seconds (eight hours). Reducing this to 300 seconds (five minutes) can resolve a variety of errors such as "connect timed out" or "unexpected end of stream." See wait_timeout for more information.

ON UPDATE and ON DELETE commands with CASCADE, SET NULL, or SET DEFAULT clauses are not captured by MySQL's binlog, so are not read by MySQL Reader.