Prerequisites for Snowflake Connector for MySQL datasources¶
Note
The Snowflake Connector for MySQL is subject to the Connector Terms.
Before installing the Snowflake Connector for MySQL, do the following in your MySQL environment:
Configure associated datasource¶
Ensure that you have a MySQL version 8 or higher server that includes data you want to synchronize with Snowflake.
Set the following options for your MySQL server:
log_bin = on binlog_format = row binlog_row_metadata = full binlog_row_image = full binlog_row_value_options =
Note
Be cautious about the binary log expiration period (
binlog_expire_logs_seconds
). After it ends, binary log files might be automatically removed. If the agent is paused for a long period of time (for example due to maintenance work) and the expired binary log files are deleted during this time, the agent is not able to replicate the data from these files. Set the binary log expiration period to at least a few hours to ensure stable work of the connector.For more information about the automatic purging of binary log files, see MySQL Reference Manual.
Create required user¶
Create a user for the Snowflake Connector for MySQL with the following permissions:
REPLICATION SLAVE
andREPLICATION CLIENT
to be able to read frombinlog
.For example:
GRANT REPLICATION SLAVE ON *.* TO '<username>'@'%' GRANT REPLICATION CLIENT ON *.* TO '<username>'@'%'
SELECT
permission to all tables that are replicated.For example:
GRANT SELECT ON <schema>.* TO '<username>'@'%' GRANT SELECT ON <schema>.<table> TO '<username>'@'%'Where
<schema>.<table>
is the unique identifier of a table to be replicated.
Next steps¶
After completing these procedures, follow the steps in Setting up the Snowflake Connector for MySQL using Snowsight.