15.7. Appendix G: Changing the MySQL Database Server Port

Engineering Knowledge Manager

Installation Guide | Chapter 15: Appendices |

15.6. Appendix F: Setting the HTTP Session Timeout |  | 15.8. Appendix H: Configuring Windows Services (Windows Only)
Prev |  | Next

## 15.7. Appendix G: Changing the MySQL Database Server Port

This appendix applies to EKM servers using the MySQL database server.

By default, the MySQL database server listens for client connections on TCP port `3306`. If the default port is already used by another process, it is necessary to change the port used by the MySQL database server. If this port is changed, it is also necessary to reconfigure EKM to use the new port.

To change the MySQL database server port:

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

2. Stop the database server (MySQL).

3. Perform the following modifications to the MySQL and EKM configuration:

   MySQL Configuration:

   Edit `MYSQL_HOME/my.(cnf|ini)` and update all occurrences of the port setting to the new port number (value shown below in bold).

       [client]
       port=3306
       user=root
       password=root123

       [mysqladmin]
       port=3306
       user=root
       password=root123

       [mysqld]
       port=3306
       default_storage_engine=INNODB
       transaction_isolation=READ-COMMITTED
       max_allowed_packet=128m

   EKM Configuration:

   Update the MySQL database server port in the JBoss domain configuration (see JBoss Domain Mode and Configuration):

   1. Find the `datasources` subsystem configuration element:

          <subsystem xmlns="urn:jboss:domain:datasources:4.0">

   2. Find the `datasources` child element, then find its `datasource` 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">
              <connection-url>jdbc:mysql://localhost:3306/ekm</connection-url>
              <driver>org.mariadb.jdbc</driver>
              <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
              ...
              ...
          </datasource>

   3. Modify the value of the `connection-url` element (shown above in bold) to the new MySQL JDBC URL for the MySQL database server, to reflect the new port number.

      MySQL JDBC URLs follow the form:

      `jdbc:mysql://[host][:port]/[database]`

      where:

      `host`: the database server host. If `host` is not specified, `127.0.0.1` (`localhost`) is used.

      `port`: the database server port. If `port` is not specified, the default port of `3306` is used.

      `database`: the name of the database to connect to. The default name is `ekm`.

4. Start the cluster database server (MySQL).

5. On each EKM cluster node, start the EKM server.

Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Prev | Up / Contents | Next

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