5.5 Installing the Agent on Mac OS X

To install the MySQL Enterprise Monitor Agent on Mac OS X, decompress the mysqlmonitoragent-version-installer.app.zip and then run the mysqlmonitoragent-version-installer application:

The following section describes the installation process on OS X, referring to the installation GUI.

  1. First, select the language for the MySQL Enterprise Monitor Agent installation. Click OK to continue installation.

  2. Click Next to start the installation process.

  3. Select the installation directory. The default installation directory is /Applications/mysql/enterprise/agent. Select the installation directory, or type the new directory location.

    Note

    The Installer will not overwrite a current Agent installation, and instead prompts for you to either delete the existing Agent installation, or rename the installation directory.

    Also select the method that the agent uses to communicate with the MySQL server, either a TCP/IP (network) connection, or a Socket (local) connection. Choose the connection method, and click Next.

    Note

    The monitor agent always associates localhost with the TCP/IP address 127.0.0.1, not the MySQL socket. This is in contrast to the MySQL Command Line Tool, which connects via the MySQL socket by default on Unix, if the hostname localhost is specified.

    If the MySQL server to monitor was started with the --skip-networking option, then you cannot connect to it via TCP/IP, as the server does not listen for TCP/IP connections. In this case, configure the monitor agent to use the MySQL socket. During installation, select socket rather than TCP/IP and then specify the MySQL socket name. Or, after installation, reconfigure this using the agent.sh configuration script. For further information, refer to Section D.2, “MySQL Enterprise Monitor Agent Reference”.

    If the MySQL server to monitor is started using the --bind-address option, the server only listens for connections on the IP address specified, that is, the IP address of the MySQL server. If the monitor agent is started using TCP/IP networking and the default address of 127.0.0.1, it cannot connect to the server to be monitored. Also, if localhost is specified as the host name during agent configuration, a connection cannot be established, as the server listens for connections on the address specified with the --bind-address option, not 127.0.0.1.

  4. Choose one or more operations for this agent to perform:

    Figure 5.5 MySQL Enterprise Monitor: Agent Monitoring Options

    MySQL Enterprise Monitor: Agent Monitoring Options

    • Host only: Install the Agent, but not configure a MySQL instance to monitor at this time.

    • Host and database: Install the Agent, and also configure the initial MySQL instance to monitor.

    Regardless of your choice, the Agent will continue to look for new MySQL instances to monitor on the host. The only difference is whether or not to immediately configure and monitor the first MySQL instance.

  5. You may optionally install the Agent as a service. This generates a launchd .plist file (by default, it is stored as /Library/LaunchDaemons/mysql.agent.plist, and launchd has the benefit of automatically starting the Agent after the host is restarted. Using a service is recommended.

    Figure 5.6 MySQL Enterprise Monitor: Install as a service

    MySQL Enterprise Monitor: Install as a service

  6. The Agent Installer will now install the files on your system. The following steps involve the configuration of the Agent.

  7. Enter the details of the MySQL Enterprise Service Manager to use with this Agent. You can retrieve the username from the configuration_report.txt file generated when you installed MySQL Enterprise Service Manager, but the encrypted password is not viewable. Enter the required information and then click Next to continue.

    Note

    This is the user that connects the Agent to the Service Manager. It is defined by the Service Manager, and Agent users can be modified under Settings, Manage Users. Their role is defined as "agent".

    Figure 5.7 MySQL Enterprise Monitor: Installing Agent on Mac OS X: MySQL Enterprise Service Manager Options

    MySQL Enterprise Monitor: Installing Agent on Mac OS X: MySQL Enterprise Service Manager Options

  8. If you chose "Host and database", specify the information about the initial MySQL instance that you want to monitor. The configuration information you enter depends on the connection method selected in the previous screen.

    • If you chose TCP/IP as the connection method, enter the IP address or host name of the host to monitor, and the port, Admin user name and password to connect to the MySQL server. To confirm that the MySQL server is currently reachable using the information, ensure that the Validate MySQL host name or IP address checkbox is selected.

      Figure 5.8 MySQL Enterprise Monitor: Installing Agent on Mac OS X: Monitored Database Information (TCIP)

      MySQL Enterprise Monitor: Installing Agent on Mac OS X: Monitored Database Information (TCIP)

    • If you chose Socket as the connection method, enter the full path name to the Unix socket created by your MySQL server, and the user name and password to authenticate with the server. Typical values include /tmp/mysql.sock and /var/mysql/mysql.sock.

      Figure 5.9 MySQL Enterprise Monitor: Installing Agent on Mac OS X: Monitored Database Information (Socket)

      MySQL Enterprise Monitor: Installing Agent on Mac OS X: Monitored Database Information (Socket)

    Click Next to continue the installation.

  9. Optionally, define the less privileged users for your monitored MySQL instance. Checking Auto-Create Less Privileged Users will automatically create the General and Limited users for you, using the username/password information that you provide. Unchecking this option requires you to manually create the users yourself, before proceeding with the Agent installation. For more information, see Section 5.1, “Creating MySQL User Accounts for the Monitor Agent”.

    Figure 5.10 MySQL Enterprise Monitor: Installing Agent on OS X: Additional Agent Users

    MySQL Enterprise Monitor: Installing Agent on OS X: Additional Agent Users

  10. You receive a Configuration Report containing some of the information that you entered during the installation. Check the information provided in the report. If you see a problem, use Back to go back to the configuration screen and change the information. If the information is correct, click Next to continue.

  11. You are now told how to start the Agent, which is by issuing a command similar to:

    Once the Monitor Agent is installed, it needs to be started. For information on how to start and stop the Agent, see Section 5.7.2, “Starting/Stopping the Agent on Mac OS X”.

  12. The final step links to the README. Press Finish to complete the installation, and close the Agent Installer.

Note

On Mac OS X, MySQL Enterprise Monitor will load the system SSL libraries instead of the bundled OpenSSL, which relates to using framework calls (e.g., launchd) to run the agent.

Note

If MySQL Enterprise Monitor Agent is installed as the root user, directories and files that the Agent writes to will be owned as the mysql user in the mysql group, which includes logs/, spool/, and etc/agentManaged. And the Agent will be started with the mysql user.