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:
    1. Install the MySQL JDBC driver.
    2. Install the MySQL ODBC driver.

Installing MySQL JDBC driver

Before you use MySQL Connector, you must install the MySQL JDBC driver version 8.0.12 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:
    7. Restart 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:
    1. Click the following link to download the MySQL ODBC driver: https://downloads.mysql.com/archives/c-odbc/
    2. Select the Product Version as 8.0.12.
    3. Select the Operating System as Microsoft Windows.
    4. Select the OS Version as Windows (x86, 64-bit).
    5. Download the ZIP Archive mysql-connector-odbc-noinstall-8.0.12-winx64.zip file.
    Note: Do not use the MSI installer because it removes the existing MySQL ODBC driver versions from the system.
    6. Extract the .zip file.
    7. Open the Command Prompt as an administrator and navigate to the extracted .zip file location.
    8. Run the following command in the command prompt: Install.bat
After you install the MySQL ODBC driver, check if the MySQL ODBC 8.0 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:
    1. Click the following link to download the MySQL ODBC driver: https://downloads.mysql.com/archives/c-odbc/
    2. Select the Product Version as 8.0.12.
    3. Select the Operating System as Linux- Generic.
    4. Select the OS Version as All.
    5. Download the Linux - Generic (glibc 2.12) (x86, 64-bit) file.
    6. Extract the downloaded file to a local directory in your system.
    7. Edit 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. 1. Create the following structure for the serverless agent configuration in AWS: <Supplementary file location>/serverless_agent_config
  2. 2. Add the truststore and keystore certificates in the Amazon S3 bucket in the following location in your AWS account: <Supplementary file location>/serverless_agent_config/SSL
  3. 3. Copy 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>
    where the source path is the directory path of the certificate files in AWS.
  5. 4. Ensure that the syntax and indentations are valid, and then save the file as serverlessUserAgentConfig.yml in the following AWS location: <Supplementary file location>/serverless_agent_config
  6. When the .yml file runs, the SSL certificates are copied from the AWS location to the serverless agent directory.
  7. 5. In the MySQL connection properties, specify the following certificate path in the serverless agent directory in the Trust Store and Key Store fields: /data2/home/cldagnt/SystemAgent/serverless/configurations/ssl_store/<cert_filename>