Prerequisites
Before using MySQL as an endpoint in a Qlik Replicate task, make sure that the prerequisites outlined below have been met.
Driver setup
Replicate on Windows
Install MySQL ODBC Unicode Driver 8.0.32 or 9.6 on the Replicate machine.
Replicate on Linux
-
Stop the Replicate service and optionally confirm that it has stopped as described in Replicate server procedures.
- Install MySQL ODBC Unicode Driver 8.0.32 or 9.6 on the Replicate machine.
-
Change the working directory to <Replicate-Install-Dir>/bin.
-
Copy the driver location to the site_arep_login.sh file:
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/lib64" >> site_arep_login.sh
This will add the driver to "LD_LIBRARY_PATH" and update the driver location in the site_arep_login.sh file.
-
Optionally, confirm that the driver location was copied:
cat site_arep_login.sh -
Make sure that the /etc/odbcinst.ini file contains an entry for MySQL, as in the following example:
[MySQL ODBC 9.6 Driver]Driver = /usr/lib64/libmyodbc9w.soUsageCount = 1 -
Start the Replicate service and optionally confirm that it has started as described in Replicate server procedures.
General prerequisites
Make sure that the following prerequisites have been met:
- A MySQL account with the required Permissions.
-
A MySQL database with the tables that you want to replicate should be accessible in your network.
The following MySQL editions are supported:
- MySQL Community Edition
- MySQL Standard Edition
- MySQL Enterprise Edition
- MySQL Cluster Carrier Grade Edition
Working with MySQL 8
To work with MySQL 8 as a target endpoint, you need to:
- Set the parameter
secure_file_priv = NULLin the MySQL database. - If you are using LOB columns, set the parameter
sort_buffer_size = 128Min the MySQL database.
Working with Azure Database for MySQL - Flexible Server
When working with Azure Database for MySQL - Flexible Server, the sql_generate_invisible_primary_key parameter must be set to 'OFF'.
For more information, see Limitations in Azure Database for MySQL - Flexible Server
Replicating 4-byte UTF8 emojis
To support replication of 4-byte UTF8 emojis, the target schema character set must be set to utf8mb4.
Setting the local_infile system variable
To enable data loading using CSV files (with the default command LOAD DATA LOCAL INFILE), make sure the system variable local_infile is enabled on the target database.