MySQL Connector > Introduction to MySQL Connector > Administration of MySQL Connector
  

Administration of MySQL Connector

To use MySQL Connector, you must download and install the JDBC and ODBC drivers on your Windows or Linux machine where the Secure Agent is installed.
Before you use MySQL Connector, complete the following tasks:
    1Install the MySQL JDBC driver.
    2Install the MySQL ODBC driver.

Installing MySQL JDBC driver

Before you use MySQL Connector, you must install the MySQL JDBC driver 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:
    1Click the following link to download the MySQL JDBC driver: https://downloads.mysql.com/archives/c-j/
    2Select the required Product Version.
    3Select the Operating System as Platform Independent.
    4Download the .zip or .tar file based on your Windows or Linux system.
    5Extract the downloaded file and copy the mysql-connector-java-<version>.jar file.
    6Paste the mysql-connector-java-<version>.jar file in the following directory on the Secure Agent machine:
    7Restart the Secure Agent.

Installing MySQL ODBC driver

Before you use MySQL Connector, you must install the MySQL ODBC driver on the Windows or Linux machine where you installed the Secure Agent.

Installing MySQL ODBC driver on Windows

Perform the following steps to install the MySQL ODBC driver on Windows:
    1Click the following link to download the MySQL ODBC driver: https://downloads.mysql.com/archives/c-odbc/
    2Select the required Product Version.
    3Select the Operating System as Microsoft Windows.
    4Select the OS Version as Windows (x86, 64-bit).
    5Download the ZIP Archive mysql-connector-odbc-noinstall-<version>-winx64.zip file.
    Note: Do not use the MSI installer because it removes the existing MySQL ODBC driver versions from the system.
    6Extract the .zip file.
    7Open the Command Prompt as an administrator and navigate to the extracted .zip file location.
    8Run the following command in the command prompt: Install.bat
After you install the MySQL ODBC driver, check if the installed MySQL ODBC Unicode Driver name appears as one of the available ODBC drivers under the ODBC Data Source Administrator (64-bit) dialog box:
The following image shows the MySQL ODBC 8.0 Unicode Driver driver name in the ODBC Data Source Administrator (64-bit) dialog box when you try to create a new data source:
You can view the MySQL ODBC 8.0 Unicode Driver.

Installing MySQL ODBC driver on Linux

Perform the following steps to install the MySQL ODBC driver on Linux:
    1Click the following link to download the MySQL ODBC driver: https://downloads.mysql.com/archives/c-odbc/
    2Select the required Product Version.
    3Select the Operating System as Linux- Generic.
    4Select the OS Version as All.
    5Download the Linux - Generic (glibc 2.12) (x86, 64-bit) file.
    6Extract the downloaded file to a local directory in your system.
    Note: When you extract the file, ensure that you copy all files from the downloaded driver package.
    7Edit the <Secure Agent installation directory>/odbcinst.ini file and add the following values:
    [MySQL ODBC 8.0 Unicode Driver]
    Description = ODBC for MySQL
    Driver = <Extracted folder path>/lib/libmyodbc8w.so
    Setup = <Extracted folder path>/lib/libmyodbc8w.so
    FileUsage = 1
    In the Driver and Setup fields, you must specify the file path of the libmyodbc8w.so file that you extracted to the local directory in your system.

Prerequisites to configure SSL with serverless runtime environment

You can use the serverless runtime environment with MySQL Connector to connect to an SSL-enabled MySQL database.
Before you configure a secure MySQL connection using the serverless runtime environment, complete the following prerequisite tasks to add the SSL certificates to the serverless runtime location:
  1. 1Create the following structure for the serverless agent configuration in AWS or Azure: <Supplementary file location>/serverless_agent_config
  2. 2Add the truststore and keystore certificates in the Amazon S3 bucket or Azure container in the following location in your AWS or Azure account: <Supplementary file location>/serverless_agent_config/SSL
  3. 3Copy the following code snippet to a text editor:
  4. version: 1
    agent:
    agentAutoApply:
    general:
    sslStore:
    - fileCopy:
    sourcePath: SSL/<TrustStore_filename>
    - fileCopy:
    sourcePath: SSL/<KeyStore_filename>
    dataIntegrationServer:
    autoDeploy:
    mysql:
    jdbc:
    drivers:
    - fileCopy:
    sourcePath: <Driver directory>/<MySQL_JDBC_filename>
    odbc:
    drivers:
    - fileCopy:
    sourcePath: <Driver directory>/<MySQL_ODBC_ZIP_filename>
    where the source path is the directory path of the certificate files in AWS or Azure.
  5. 4Ensure that the syntax and indentations are valid, and then save the file as serverlessUserAgentConfig.yml in the following AWS or Azure location: <Supplementary file location>/serverless_agent_config
  6. When the .yml file runs, the SSL certificates are copied from the AWS or Azure location to the serverless agent directory.
  7. 5In the MySQL connection properties, specify the following certificate path in the serverless agent directory in the Trust Store and Key Store fields: /home/cldagnt/SystemAgent/serverless/configurations/ssl_store/<cert_filename>