My (SQL) Connector en
My (SQL) Connector en
MySQL Connector
Informatica Data Integration - Free & PayGo MySQL Connector
November 2023
© Copyright Informatica LLC 2017, 2023
This software and documentation are provided only under a separate license agreement containing restrictions on use and disclosure. No part of this document may be
reproduced or transmitted in any form, by any means (electronic, photocopying, recording or otherwise) without prior consent of Informatica LLC.
U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial
computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such,
the use, duplication, disclosure, modification, and adaptation is subject to the restrictions and license terms set forth in the applicable Government contract, and, to the
extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License.
Informatica, the Informatica logo, Informatica Cloud, and PowerCenter are trademarks or registered trademarks of Informatica LLC in the United States and many
jurisdictions throughout the world. A current list of Informatica trademarks is available on the web at https://www.informatica.com/trademarks.html. Other company
and product names may be trade names or trademarks of their respective owners.
Portions of this software and/or documentation are subject to copyright held by third parties. Required third party notices are included with the product.
DISCLAIMER: Informatica LLC provides this documentation "as is" without warranty of any kind, either express or implied, including, but not limited to, the implied
warranties of noninfringement, merchantability, or use for a particular purpose. Informatica LLC does not warrant that this software or documentation is error free. The
information provided in this software or documentation may include technical inaccuracies or typographical errors. The information in this software and documentation
is subject to change at any time without notice.
NOTICES
This Informatica product (the "Software") includes certain drivers (the "DataDirect Drivers") from DataDirect Technologies, an operating company of Progress Software
Corporation ("DataDirect") which are subject to the following terms and conditions:
1. THE DATADIRECT DRIVERS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
2. IN NO EVENT WILL DATADIRECT OR ITS THIRD PARTY SUPPLIERS BE LIABLE TO THE END-USER CUSTOMER FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, CONSEQUENTIAL OR OTHER DAMAGES ARISING OUT OF THE USE OF THE ODBC DRIVERS, WHETHER OR NOT INFORMED OF THE POSSIBILITIES
OF DAMAGES IN ADVANCE. THESE LIMITATIONS APPLY TO ALL CAUSES OF ACTION, INCLUDING, WITHOUT LIMITATION, BREACH OF CONTRACT, BREACH
OF WARRANTY, NEGLIGENCE, STRICT LIABILITY, MISREPRESENTATION AND OTHER TORTS.
The information in this documentation is subject to change without notice. If you find any problems in this documentation, report them to us at
[email protected].
Informatica products are warranted according to the terms and conditions of the agreements under which they are provided. INFORMATICA PROVIDES THE
INFORMATION IN THIS DOCUMENT "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING WITHOUT ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT.
Chapter 4: Troubleshooting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table of Contents 3
Preface
Use MySQL Connector to learn how to read from MySQL databases by using Data Integration. Learn to create
a MySQL connection, develop mappings, and run mapping and data transfer tasks in Data Integration.
Informatica Resources
Informatica provides you with a range of product resources through the Informatica Network and other online
portals. Use the resources to get the most from your Informatica products and solutions and to learn from
other Informatica users and subject matter experts.
Informatica Documentation
Use the Informatica Documentation Portal to explore an extensive library of documentation for current and
recent product releases. To explore the Documentation Portal, visit https://docs.informatica.com.
If you have questions, comments, or ideas about the product documentation, contact the Informatica
Documentation team at [email protected].
https://network.informatica.com/community/informatica-network/products/cloud-integration
Developers can learn more and share tips at the Cloud Developer community:
https://network.informatica.com/community/informatica-network/products/cloud-integration/cloud-
developers
https://marketplace.informatica.com/
4
Informatica Knowledge Base
Use the Informatica Knowledge Base to find product resources such as how-to articles, best practices, video
tutorials, and answers to frequently asked questions.
To search the Knowledge Base, visit https://search.informatica.com. If you have questions, comments, or
ideas about the Knowledge Base, contact the Informatica Knowledge Base team at
[email protected].
Subscribe to the Informatica Intelligent Cloud Services Trust Center to receive upgrade, maintenance, and
incident notifications. The Informatica Intelligent Cloud Services Status page displays the production status
of all the Informatica cloud products. All maintenance updates are posted to this page, and during an outage,
it will have the most current information. To ensure you are notified of updates and outages, you can
subscribe to receive updates for a single component or all Informatica Intelligent Cloud Services
components. Subscribing to all components is the best way to be certain you never miss an update.
To subscribe, on the Informatica Intelligent Cloud Services Status page, click SUBSCRIBE TO UPDATES. You
can choose to receive notifications sent as emails, SMS text messages, webhooks, RSS feeds, or any
combination of the four.
To find online support resources on the Informatica Network, click Contact Support in the Informatica
Intelligent Cloud Services Help menu to go to the Cloud Support page. The Cloud Support page includes
system status information and community discussions. Log in to Informatica Network and click Need Help to
find additional resources and to contact Informatica Global Customer Support through email.
The telephone numbers for Informatica Global Customer Support are available from the Informatica web site
at https://www.informatica.com/services-and-training/support-services/contact-us.html.
Informatica Resources 5
Chapter 1
You can also use MySQL Connector to connect to the following databases:
You can use MySQL objects as sources in mappings, mapping tasks, and data transfer tasks.
When you use MySQL Connector, you can include the following Data Integration assets:
For more information about configuring assets and transformations, see Mappings, Transformations, and
Tasks in the Data Integration documentation.
6
Installing MySQL JDBC driver
Before you use MySQL Connector, you must install the MySQL JDBC driver version 8.0.12 and MySQL ODBC
driver on the Windows or Linux machine where you installed the Secure Agent.
Perform the following steps to install the MySQL JDBC drivers on Windows or Linux:
1. Click the following link to download the MySQL JDBC driver: https://downloads.mysql.com/archives/c-j/
2. Select the Product Version as 8.0.12.
3. Select the Operating System as Platform Independent.
4. Download the .zip or .tar file based on your Windows or Linux system.
5. Extract the downloaded file and copy the mysql-connector-java-8.0.12.jar file.
6. Paste the mysql-connector-java-8.0.12.jar file in the following directory on the Secure Agent
machine:
• On Windows: <Secure Agent installation directory>\apps\Data_Integration_Server\ext
\drivers
• On Linux: <Secure Agent installation directory>/apps/Data_Integration_Server/ext/drivers
7. Restart the Secure Agent.
• You cannot include lookup fields of Text or Ntext data type because MySQL connections use a UTF-8 code
page.
• When you use a saved query to read data from a MySQL source, you must not use the full outer join
operation.
• When you use a saved query to read data from a MySQL source that contains Float columns, the Secure
Agent imports the Float data type as Real data type.
• When you use a saved query to read data from a MySQL source that contains Double columns, the Secure
Agent imports the Double data type as Decimal data type.
• You cannot use the select * from <table_name> command in a saved query. You must provide the
explicit column list.
• When you run a MySQL mapping to read from a stored procedure, ensure that the precision of the Float
data type does not exceed 18.
• When the source column name that you read has hyphens and you use the Create New at Runtime option
to create a target, the hyphens in the table name are converted to underscores in the target column.
• You cannot use SQL ELT optimization to push the transformation logic to MySQL.
MySQL connections
Create a MySQL connection to connect to MySQL so that the Secure Agent can read data from MySQL.
You create a MySQL connection on the Connections page. Use the connection when you create the
mappings, mapping tasks, and data transfer tasks.
Property Description
Runtime Environment The name of the runtime environment where you want to run the tasks.
Specify a Secure Agent or a Hosted Agent.
User Name User name for the database login. The user name can't contain a semicolon.
Password Password for the database login. The password can't contain a semicolon.
Database Name Name of the MySQL database that you want to connect to.
Note: The database name is case-sensitive.
Maximum length is 64 characters. Database name can contain alphanumeric and underscore
characters.
10
Property Description
Metadata Advanced Additional properties for the JDBC driver to fetch the metadata.
Connection If you specify more than one property, separate each key-value pair with a semicolon.
Properties
Runtime Advanced Additional properties for the ODBC driver to run mappings.
Connection If you specify more than one property, separate each key-value pair with a semicolon.
Properties
SSL properties
You can configure a MySQL connection to use SSL to securely communicate with the MySQL database.
Note: You can enable SSL for a MySQL connection only when you use the 8.x MySQL JDBC and ODBC drivers.
Ensure that both the MySQL JDBC and ODBC drivers are of 8.x version.
To configure SSL, you must first download and install the MySQL ODBC and JDBC drivers, version 8.x. For
information about installing the MySQL ODBC and JDBC drivers, version 8.x, see the Knowledge Base article:
561573
After you install the drivers, in the MySQL connection properties, enable SSL and specify the TLS protocols
that you want to use for the secure communication.
When you enable SSL for the MySQL connection, you must configure the SSL properties for both the MySQL
JDBC and ODBC drivers. Configure the required SSL properties for the JDBC driver, so that the Secure Agent
can access metadata securely from MySQL. Also, configure the required SSL properties for the ODBC driver,
so that the Secure Agent runs mappings to securely read from or write data to MySQL.
Note: SSL is not applicable when you use the Hosted Agent. You can configure SSL when you use the Secure
Agent.
Connection Description
property
Use SSL Determines whether the Secure Agent establishes a secure connection to the MySQL database.
When you select this option and the database server supports SSL, the Secure Agent establishes
an encrypted connection. If the MySQL database server cannot configure SSL, the connection
either fails or the Secure Agent establishes an unencrypted connection depending on whether you
enable or disable the Require SSL checkbox.
If you do not select the Use SSL checkbox, the Secure Agent attempts to establish an unencrypted
connection.
Verify Server If you select Use SSL and select this option, the client validates the server certificate that is sent
Certificate by the database server.
TLS Protocols The TLS protocols used for the secure communication when you select Use SSL.
You can select from the following protocols:
- TLSv1
- TLSv1.1
- TLSv1.2
Default is TLSv1.2. The TLSv1 and TLSv1.1 protocols are not applicable.
The following table describes the MySQL connection properties for the JDBC driver version 8.x when you
enable Use SSL:
Trust Certificate Key The path and file name of the truststore file. You must prefix the file path with file colon
Store (file:).
For example, file:C:\SSL\mysql_new\truststore
Client Certificate Key The path and file name of the keystore file. You must prefix the file path with file colon
Store (file:).
For example, file:C:\SSL\mysql_new\keystore
SSL Key The path and the name of the private key of the client.
For example, C:\SSL\mysql_new\client-key.pem
Verify Server's Identity Verifies the host name in the certificate while verifying the server CA certificate.
This property is applicable only when you enable Verify Server Certificate in the SSL
properties.
Describe the flow of data from source and target along with the required transformations before the agent
writes data to the target. When you create a mapping task, select the mapping that you want to use. Use the
Mapping Task wizard to create a mapping task. Validate and run the mapping to read data from sources and
write to a target. The mapping task processes data based on the data flow logic you define in the mapping.
Specify the name and description of the MySQL source. Configure the source, query options, and advanced
properties for the source object.
The following table describes the source properties that you can configure for a MySQL source:
Property Description
Source Type Type of the MySQL source object available. You can choose from the following source types:
- Single
- Multiple
- Query
- Parameter
14
Property Description
Parameter A parameter file where you define values that you want to update without having to edit the task.
Select an existing parameter for the source object or click New Parameter to define a new
parameter for the source object.
The Parameter property appears only if you select parameter as the source type.
If you want to overwrite the parameter at runtime, select the Allow parameter to be overridden at
run time option.
When the task runs, the Secure Agent uses the parameters from the file that you specify in the
advanced session properties.
Filter Configure a simple filter or an advanced filter to remove rows at the source. You can improve
efficiency by filtering early in the data flow.
A simple filter includes a field name, operator, and value. Use an advanced filter to define a more
complex filter condition, which can include multiple conditions using the AND or OR logical
operators.
Sort Select the fields and type of sorting to use. To sort data for a parameterized source, you must use a
parameter for the sort options.
The following table describes the advanced source properties that you can configure for a MySQL source:
Property Description
Tracing level Amount of detail that appears in the log for this transformation. You can choose terse, normal,
verbose initialization, or verbose data. Default is normal.
Pre SQL Pre-SQL command to run before reading data from the source.
Post SQL Post-SQL command that must be run after reading data from the source.
Output is Relational source or transformation output that does not change between session runs when
Deterministic the input data is consistent between runs.
When you configure this property, the Secure Agent does not stage source data for recovery if
transformations in the pipeline always produce repeatable data.
Output is repeatable Relational source or transformation output that is in the same order between session runs
when the order of the input data is consistent.
When output is deterministic and output is repeatable, the Secure Agent does not stage source
data for recovery.
When you configure a lookup in MySQL, you select the lookup connection and lookup object.
The following table describes the MySQL lookup object properties that you can configure in a Lookup
transformation:
Property Description
Source Type Type of the MySQL lookup object available. You can choose from the following lookup object types:
- Single Object
- Parameter
Parameter A parameter file where you define values that you want to update without having to edit the task.
Select an existing parameter for the lookup object or click New Parameter to define a new
parameter for the lookup object.
The Parameter property appears only if you select parameter as the source type.
If you want to overwrite the parameter at runtime, select the Allow parameter to be overridden at
run time option.
When the task runs, the Secure Agent uses the parameters from the file that you specify in the
advanced session properties.
Multiple The behavior when the lookup condition returns multiple matches.
Matches You can select one of the following options:
- Return first row
- Return last row
- Return any row
- Return all rows
- Report error
Before you configure stored procedures, you must specify the following property in the Runtime Advanced
Connection Properties in the MySQL connection for stored procedures to work: NO_SSPS=1
Note: Informatica recommends that you create a separate MySQL connection and specify the property when
you configure stored procedures.
You can then configure the SQL transformation to process the following types of SQL statements:
Stored procedures reside in the database and run within the database. When you configure the SQL
transformation to process a stored procedure, it passes input parameters to the stored procedure. The
stored procedure passes the return value or values to the output fields of the transformation.
SQL Query
You can configure the SQL transformation to process a saved query that you create in Data Integration
or you can enter a query in the SQL editor.
For more information about SQL transformations, see Transformations in the Data Integration
documentation.
Troubleshooting
Use the following sections to troubleshoot errors in MySQL Connector.
For a list of common error messages and possible solutions, see the article,
"Troubleshooting: Common Error Messages".
18
Appendix A
MySQL data types appear in the source transformations when you choose to edit metadata for the fields.
Set of data types that appear in the transformations. They are internal data types based on ANSI SQL-92
generic data types, which the Secure Agent uses to move data across platforms. Transformation data
types appear in all transformations in a mapping.
When Data Integration reads source data, it converts the native data types to the comparable
transformation data types before transforming the data.
19
MySQL Data Transformation Data Description
Type Type
Date Date/Time Jan 1, 0001 A.D. to Dec 31, 9999 A.D. (Precision to the nanosecond)
Datetime Date/Time Jan 1, 0001 A.D. to Dec 31, 9999 A.D. (precision to the nanosecond)
Timestamp Date/Time Jan 1, 0001 A.D. to Dec 31, 9999 A.D. (precision to the nanosecond)
D MySQL sources
mapping 15
Data Integration community rules and guidelines 9
URL 4
data type reference
overview 19 S
status
M trust site
description 5
maintenance outages 5
mapping
mapping task 14
mappings
U
MySQL sources 14 upgrade notifications 5
MySQL
connection properties 10
data types 19
MySQL connector
W
rules and guidelines 17 web site 4
MySQL Connector
overview 6
21