Remote MySQL Server Guide

The InterWorx Control panel allows the ability to manage multiple external MySQL servers from a single installation of InterWorx, via MySQL server pooling. Once added, the remote MySQL Servers may be assigned to new SiteWorx accounts.

From the Manage Servers page in NodeWorx, server administrators can add and remove remote MySQL servers, as well as change the remote MySQL server root MySQL password, and terminate running MySQL queries.

Note

The external MySQL server must allow remote connections from the InterWorx server. For the initial setup, a root-level MySQL username and password must also be provided.

To Add a Remote MySQL Server

  1. Log into NodeWorx from the browser (https://ip.ad.dr.ess:2443/nodeworx)

  2. In NodeWorx, navigate to System Services > MySQL Server > Manage Servers

  3. Click +. This opens the Add MySQL Server form

  4. Update the required fields:

    • Nickname: Nickname for the remote MySQL server

    • Host: The remote MySQL server’s hostname or IP address, and port, if required

    • Database Root Username: The root MySQL username of the remote server. This is not the same as the system root user

    • Database Root Password: The root MySQL password for the remote server. This is not the same as the system root password

    add remote mysql server
  5. Click Add

To Manage the Remote MySQL Server

Editing the Remote Server MySQL Root Password

  1. Log into NodeWorx from the browser (https://ip.ad.dr.ess:2443/nodeworx)

  2. In NodeWorx, navigate to System Services > MySQL Server > Manage Servers

  3. Click the Pencil next to the Remote Server. This opens the MySQL Server Control page

  4. Under MySQL Root Password update the Password and Confirm Password options with the new password

    remote mysql server password edit form
  5. Click Save

Editing the Remote Server Nickname

  1. Log into NodeWorx from the browser (https://ip.ad.dr.ess:2443/nodeworx)

  2. In NodeWorx, navigate to System Services > MySQL Server > Manage Servers

  3. Click the Pencil next to the Remote Server. This opens the MySQL Server Control page

  4. Under MySQL Server Nickname, update the Nickname field with the new nickname

    remote mysql nickname edit form
  5. Click Save

Terminating Running MySQL Queries on the Remote Server

  1. Log into NodeWorx from the browser (https://ip.ad.dr.ess:2443/nodeworx)

  2. In NodeWorx, navigate to System Services > MySQL Server > Manage Servers

  3. Click the Pencil next to the Remote Server. This opens the MySQL Server Control page

  4. Under Current MySQL Processes, select the checkbox next to the processes/queries to be terminated

    Note

    If there are no active or running processes, the Current MySQL Processes section will state “No Active MySQL Processes/Queries”.

  5. From the With Selected dropdown, select Terminate

    remote mysql server process list
  6. Click Go

To Remove a Remote MySQL Server

Note

Once a MySQL server is in use by a SiteWorx account, it cannot be removed until that SiteWorx account has its databases transferred to another MySQL server

  1. Log into NodeWorx from the browser (https://ip.ad.dr.ess:2443/nodeworx)

  2. In NodeWorx, navigate to System Services > MySQL Server > Manage Servers

  3. Click the Trashcan next to the Remote Server. This opens the Delete Confirmation form

    delete remote mysql server form
  4. Click Delete

To Transfer SiteWorx Accounts Between MySQL Servers

Changing the database server that a SiteWorx account uses can only be done via the command line at this time

Note

Existing databases, users, permissions will still remain on the original server after the transfer, and will need to be removed, manually. The transfer script also does not update any application connection string, so they must be updated, manually, as well.

Warning

Before attempting a database server transfer, it is highly recommended to first back up the SiteWorx account

  1. Log in to the server at the CLI as root, either via SSH or from the terminal

  2. At the CLI, run the InterWorx SiteWorx database transfer script. It has two required parameters:

    ~iworx/bin/iworxdb-transfer.pex --domain {domain} --new-server-nickname {remote server nickname}
    

Parameter

Description

--domain {domain}

Domain of the SiteWorx account

--new-server-nickname {remote server nickname}

Nickname of the MySQL Server where the SiteWorx databases will be transferred

There are also several optional flags that may be used when transferring SiteWorx databases between MySQL servers:

Parameter

Description

--force

Transfers all databases, regardless of any collisions. WARNING: If a collision is found, the existing database on the new server will be dropped and replaced with the new database

--dont-transfer-data

Only assigns the SiteWorx account to use the new server for MySQL. Does NOT transfer existing MySQL users or databases