Changing the Gateway Administrator Database

Gateway Administrator installs with a HyperSQL database, which is used by default to store Gateway Administrator data. This default database is suitable for initial testing. For configuring a high availability production environment, you will need to configure Gateway Administrator to use an external database running on a different system.

Install MySQL

  1. Download and run the MySQL installer from the MySQL Downloads page:

    http://dev.mysql.com/downloads/installer/

  2. Run the installer on the system you want to store your database.

  3. Make a note of the root password. You will need this to create the database.

Install the JDBC Driver for MySQL (Connector/J)

  1. Download the driver from the MySQL downloads page:

    http://www.mysql.com/products/connector/

  2. On the system running Reflection Gateway Administrator service, navigate to GatewayAdministrator\lib folder. The default location is:

    C:\Program Files\Micro Focus\ReflectionGateway\GatewayAdministrator\lib

  3. Copy the driver jar file to this location (for example mysql-connector-java-5.1.44-bin.jar).

Create the database

Use the MySQL command line tool or MySQL WorkBench to create a database. For example, to create a database with the name "gateway" using the command line tool:

  1. On the system running MySQL, start the command line client. For example:

    Start > MySQL Server 5.7 > MySQL 5.7 Command Line Client

  2. Enter the MySQL root password.

  3. You’ll see the following prompt:

    mysql>

  4. Create the database as shown here. (Note that a semicolon is required to complete the command.)

    mysql> create database gateway;

Create the database user that Gateway Administrator will use to connect to the database

If MySQL is running on the same server as Gateway Administrator, you can use the MySQL root user without making any modifications to this user.

If the database is installed on a different system than Gateway Administrator, the user must be able to connect from a remote host using the host’s network name or IP address. You can use MySQL Workbench or a command line to grant network access by allowing access from a specific host, or using the % wildcard to allow access from any host.

For example, to use the MySQL command line to create a user called gwuser with access to Gateway Administrator from any host:

  1. On the system running MySQL, start the command line client.

  2. Enter the following commands, replacing some_password with the actual password you want to use for this user.

    CREATE USER 'gwuser'@'%' IDENTIFIED BY 'some_password';
    GRANT ALL PRIVILEGES ON gateway.* to 'gwuser'@'%';
  3. Make a note of the username and password; you will need these to configure Gateway Administrator.

Configure Gateway Administrator to use the MySQL database

To configure Gateway Administrator to use the MySQL database, you will edit the Gateway Administrator properties file. To do this you must be an Administrator on the Windows system running Gateway Administrator.

  1. Open the Gateway Administrator properties file in a text editor. The default location is:

    C:\Program Files\Micro Focus\ReflectionGateway\GatewayAdministrator\conf\container.properties

  2. Comment out the HyperSQL settings, and uncomment the MySQL settings. Configure the MySQL hostname, database name, user name, and password. For example:

    # HyperSQL (default)
    #jdbc.url=jdbc:hsqldb:file:../etc/database/gateway.db
    #jdbc.username=sa
    #jdbc.password=
    #hibernate.dialect=org.hibernate.dialect.HSQLDialect
    
    # MySQL (recommended for production or clustered environments)
    jdbc.url=jdbc:mysql://myhost:3306/gateway?useSSL=false
    jdbc.username=gwuser
    jdbc.password=some_password
    hibernate.dialect=org.hibernate.dialect.MySQLDialect
  3. Restart the Reflection Gateway Administrator service and wait until the server.log shows the message “Server container started.”

  4. Log in to Gateway Administrator using the default user and password (admin/secret).

    Any settings you configured using the default database will need to be redone using the new database.

  5. If you have configured the Reflection Secure Shell Proxy to enable connections from Reflection Gateway users, repeat the Activate and Verify action. (See Enable Reflection Gateway Connections in the Reflection Secure Shell Proxy.)