Chapter 2: NodeWorx MySQL Overview Page Up Part I: MySQL administration via NodeWorx Chapter 4: phpMyAdmin 

3 Remote Servers

The remote servers feature, as stated earlier, allows you as a web host to remove the responsibility of running a MySQL database server from the InterWorx server and move it to it’s own segregated server. Furthermore, if one MySQL server becomes overwhelmed, you can additional MySQL servers for new accounts to use. Remote servers can be managed in NodeWorx under System Services ▷ MySQL Server ▷ Remote Servers

3.1 The Remote Servers Screen

figure images/nodeworx/mysql/mysql-add-1.png
Figure 3.1 The Remote Servers screen
As seen in Figure 3.1↑, the remote servers screen lists all the servers, including the one running locally on the InterWorx box (localhost). The main purpose of this screen is to give you a quick look at all the servers available for you and your resellers to assign SiteWorx accounts to, as well as their status (Online/Offline/Connected/Disconnected) and version. This screen also allows you to set what the “default” MySQL server, and remove remote servers if you no longer want them available to your InterWorx server. By default, when you visit this screen all you’ll see is the localhost server. Keep in mind that changing MySQL servers of a SiteWorx account after it’s created is not a trivial process as data may need to be migrated, and version discrepancies may create issues. See chapter 7↓ for details on how this is done.

3.2 Adding a remote server

As discussed in section 1.1↑ and section 1.2.2↑, the requirements for a remote server are:
  • The MySQL server version must be between 5.0 and 5.6.
  • You must know the root MySQL password for InterWorx to interact with the server.
  • The InterWorx server must be able to communicate with the MySQL server on TCP port 3306.
  • The remote MySQL server must be setup to receive incoming connections, particularly for the root MySQL user.
figure images/nodeworx/mysql/mysql-add-2.png
Figure 3.2 Adding a new remote MySQL server
As you can see in figure 3.2↑, adding a new server is fairly straight forward. You need to pick a “nickname” for the MySQL server which will be used by InterWorx to refer to that server easily instead of using host name or IP. This also makes it easier when adding new accounts through our API or CLI because you specify the MySQL server to use via nickname. It also is easier to remember what server is for what when you are adding new MySQL servers by IP address.

3.3 Setting a default MySQL server

As you can see in figure 3.3↓, setting a default server is as simple as clicking a “favorite” star next to the preferred server. By setting a default MySQL server, you are setting the server that will be used automatically when creating a SiteWorx account without an explicitly set remote server. Most billing systems interact with InterWorx on a very basic level, and many don’t go out of their way to specify which MySQL server to use since that is not the concern of most billing systems. By setting a default MySQL server, you are ensuring that unless otherwise specified, a SiteWorx account will be mapped to the correct server.
figure images/nodeworx/mysql/mysql-remote-servers.png
Figure 3.3 Setting a default MySQL server
Another benefit of the default server setting is when creating a SiteWorx account manually through the interface, the default server will be selected by default in the drop down menu.

3.4 Deleting a remote server

Deleting a server from InterWorx is quite easy, you simply click delete and the system will prompt you to make sure you are sure you want to remove the server. By default, InterWorx will not permit you to remove MySQL servers that are currently in use by SiteWorx accounts. Once deleted, you will not be able to map SiteWorx accounts to that database and if it was a default server, the default will return to localhost. You can never delete the localhost server, only turn it off.

3.5 Managing/Configuring a remote server

Unfortunately InterWorx isn’t magical and can’t change /etc/my.cnf settings on the other box without opening an SSH session. Therefore, when clicking [Configuration] on the Remote Servers screen, you will see a simplified version of the overview page for the localhost server which details the status of the server (up or down), the ability to change root password, and also active threads/processes. Essentially, you are limited to what can be accessed via the MySQL client. In order to manipulate settings, you will have to do so outside of InterWorx directly on the server itself. The MySQL documentation is a fantastic resource that can guide you on configuring your remote server.
 Chapter 2: NodeWorx MySQL Overview Page Up Part I: MySQL administration via NodeWorx Chapter 4: phpMyAdmin 

(C) 2019 by InterWorx LLC