15.17. Appendix Q: Configuring the MySQL Connector/J JDBC Driver

When MySQL is selected as the database server during ANSYS EKM Server product installation, the MySQL-compatible MariaDB driver is installed by default.

For production usage of EKM, it is recommended to download and configure the MySQL Connector/J driver. This driver can be downloaded from the following URL:

http://dev.mysql.com/downloads/connector/j/

To configure the MySQL Connector/J driver, perform the following steps:

  1. On each EKM cluster node, stop the EKM server.

  2. Create a JBoss module for MySQL Connector/J:

    1. Create the module directory:

      JBOSS_HOME/modules/com/mysql/jdbc/main

    2. Copy the MySQL Connector/J driver to the module directory. The driver is a .JAR file; for example:

      mysql-connector-java-5.1.37-bin.jar

    3. Create the module descriptor file called module.xml in the module directory. The module descriptor file should contain the following content. Substitute the actual filename of the MySQL Connector/J driver you downloaded for the filename shown in bold in the example below:

      <?xml version="1.0" encoding="UTF-8"?>
      <module xmlns="urn:jboss:module:1.3" name="com.mysql.jdbc">
          <resources>
              <resource-root path="mysql-connector-java-5.1.37-bin.jar" />
          </resources>
          <dependencies>
              <module name="javax.api" />
              <module name="javax.transaction.api" />
          </dependencies>
      </module>

Perform the following additional steps on the JBoss domain controller:

  1. Edit the JBoss domain configuration (see JBoss Domain Mode and Configuration).

  2. Find the datasources subsystem configuration element:

     <subsystem xmlns="urn:jboss:domain:datasources:4.0">
  3. Find the datasources child element, then find its datasources child element whose pool-name attribute value is ekmds:

    <datasource jndi-name="java:jboss/datasources/ekmds" pool-name="ekmds" enabled="true"
       use-java-context="true">

    Change the value of the driver child element from:

     <driver>org.mariadb.jdbc</driver>

    to:

    <driver>com.mysql.jdbc</driver>
  4. Find the drivers child element, and replace the driver child element for the MariaDB driver:

    <driver name="org.mariadb.jdbc" module="org.mariadb.jdbc">
       <driver-class>org.mariadb.jdbc.Driver</driver-class>
    </driver>

    with a driver child element for the MySQL Connector/J driver:

    <driver name="com.mysql.jdbc" module="com.mysql.jdbc">
       <driver-class>com.mysql.jdbc.Driver</driver-class>
    </driver>

Perform the following steps on each EKM cluster node:

  1. Start the EKM server.


Release 18.2 - © ANSYS, Inc. All rights reserved.