5.4 Installing the Monitor Agent on Unix and Linux


To install the MySQL Enterprise Monitor Agent on Linux systems, you must have the Linux Standards Base (LSB) initialization functions installed. To check the existence of the LSB components, look for an LSB package within your Linux package management environment. For example, on RedHat and other RPM-based distributions:

shell> rpm -qa | grep -i lsb

Under Debian/Ubuntu:

shell> dpkg -l|grep -i lsb
ii  lsb-base                                   3.2-20ubuntu4                     
    Linux Standard Base 3.2 init script function
ii  lsb-release                                3.2-20ubuntu4
    Linux Standard Base version reporting utility

Alternatively, you can use the lsb_release command. Existence of this command normally indicates that the current distribution is LSB compliant.

To install the agent, navigate to the directory that contains the file mysqlmonitoragent-version-installer.bin (where version indicates the three-part version number, the OS, and the architecture).


For performance reasons, it is strongly recommended that you install the 32-bit agent and JVM package on 64-bit platforms. For more information, see Compatibility Libraries

Ensure that this file is executable by typing:

shell> chmod +x mysqlmonitoragent-version-installer.bin

To install to the default directory (/opt/mysql/enterprise/agent), log in as root first. Installing as an unprivileged user installs to the /home/user_name/mysql/enterprise/agent directory.

To automatically start the agent upon rebooting, you must install while logged in as root. If you install as an unprivileged user, you must start the agent yourself after each reboot.


If MySQL Enterprise Monitor Agent is installed as the root user, directories and files that the Agent writes to are owned by the mysql user in the mysql group, which includes logs/, spool/, and etc/agentManaged. The Agent is started by, and runs as, the mysql user.

The following section covers installation from the command line. You can install the Monitor Agent graphically by running the installer from within a windows manager. In both cases, the steps are identical.

You can also install the Monitor Agent in unattended mode, for example to do multiple installations. For more information on unattended installation, see Section 8.1, “Unattended Installation”.


To install multiple agents on the same machine, use the agentservicename option with the installer to set a unique service name each time. For more information, see installer_agentservicename.


On FreeBSD, the Agent Installer does not bundle the required JRE 8.

Begin installation from the command line by typing:

shell> ./mysqlmonitoragent-version-installer.bin --mode text

The following section shows the various options. Default values are indicated by square brackets; to select them, press Enter. Otherwise, enter a value of your choosing.

  1. First, select the Language you want to use during the installation process:

    Language Selection
    Please select the installation language
    [1] English - English
    [2] Japanese - 日本語
    Please choose an option [1] : 
  2. Next, specify the directory in which to install the agent:

    Welcome to the MySQL Enterprise Monitor Agent Setup Wizard.
    Installation directory
    Please specify the directory where MySQL Enterprise Monitor Agent will be 
    Installation directory [/opt/mysql/enterprise/agent]:
  3. If the installer identifies that an existing version of the MySQL Enterprise Monitor Agent is installed, provide an alternative name for the installation. This defines the name of the file created in /etc/init.d used to start the agent. You can enter a different name to perform multiple installations.

  4. Specify the MySQL server to monitor. First, specify whether to use a TCP/IP or a socket-based connection to communicate with the MySQL Server:

    How will the agent connect to the database it is monitoring?
    [1] TCP/IP
    [2] Socket
    Please choose an option [1] : 
  5. Choose whether or not you want to define a MySQL instance to monitor, or wait and configure it in the GUI.

    Monitoring Options
    You can configure the Agent to monitor this host (file systems, CPU, RAM, etc.) 
    and then use the Monitor UI to furnish connection parameters for all current and 
    future running MySQL Instances. This can be automated or done manually for each 
    MySQL Instance discovered by the Agent. (Note: scanning for running MySQL 
    processes is not available on Windows, but you can manually add new connections 
    and parameters from the Monitor UI as well.)
    Monitoring options:
    [1] Host only: Configure the Agent to monitor this host and then use the Monitor UI 
        to furnish connection parameters for current and future running MySQL Instances.
    [2] Host and database: Configure the Agent to monitor this host and furnish connection 
        parameters for a specific MySQL Instance now. This process may be scripted. Once 
        installed, this Agent will also continuously look for new MySQL Instances to 
        monitor as described above.
    Please choose an option [2] : 
  6. The installer copies the necessary files:

    Setup is now ready to begin installing MySQL Enterprise Monitor Agent on your 
    Do you want to continue? [Y/n]: 
    Please wait while Setup installs MySQL Enterprise Monitor Agent on your 
      0% ______________ 50% ______________ 100%
  7. Next, provide the Agent user that you created when installing the MySQL Enterprise Service Manager. This user connects to the Service Manager.

    MySQL Enterprise Monitor UI Options
    Hostname or IP address []:
    Tomcat SSL Port [18443]: 
    Agent Username [agent]: 
    Agent Password :
    Re-enter :
  8. If you chose to monitor a MySQL server, next you provide the connection options for communicating with the server. This is a MySQL instance that you are configuring to monitor, and is typically on the host that the Agent is being installed on.

    If you selected TCP/IP, you enter the TCP/IP address and port number:

    Monitored Database Information
    IMPORTANT: The Admin user account specified below requires special MySQL 
    privileges. Please see the User Guide for more information.
    MySQL hostname or IP address []:
    Validate MySQL hostname or IP address [Y/n]:
    MySQL Port [3306]: 
    Admin User []: root
    Admin Password :
    Re-enter Password :
    Monitor UI Group []:

    If you select Socket, then you provide the path name to the MySQL socket. Typical values are /tmp/mysql.sock, /var/lib/mysql.sock, or /var/run/mysql.sock.


    The monitor agent always associates localhost with the TCP/IP address, 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 be monitored was started using the command option --bind-address, then the server only listens for connections on the IP address specified, that is, the IP address of the MySQL server. If the monitor agent was started using TCP/IP networking and the default address of, it cannot connect to the server to be monitored. Also, if localhost is specified as the host name during agent configuration, a connection is not established, as the server listens for connections on the address specified with the --bind-address option, not

  9. If you want to create the less privileged Limited and General user accounts on the MySQL instance you are configuring to monitor, then select [Y]:

    Agent User Account Creation
    IMPORTANT: Please see the User Guide for more information about Agent user 
    Auto-Create Less Privileged Users [Y/n]:
  10. If you decided to create the less privileged users, then define their usernames and passwords:

    Auto-Create Less Privileged Users [Y/n]: Y
    General Username []: general
    General Password :
    Re-enter Password :
    Limited Username []: limited
    Limited Password :
    Re-enter Password :
  11. A Configuration Report is now displayed.

    Configuration Report
    MySQL Enterprise Monitor Agent (Version :
    The settings you specified are listed below.
    Note that if you are using a Connector to collect Query Analyzer data,
    you will need some of these settings to configure the Connector. See
    the manual for more information.
    Installation directory: /opt/mysql/enterprise/agent
    MySQL Enterprise Monitor UI:
    Hostname or IP address:
    Tomcat Server Port: 18443
    Use SSL: yes
    Monitored MySQL Database:
    Hostname or IP address:
  12. Before installation starts, you receive a summary of the installation settings that you specified:

    Here are the settings you specified:
    Installation directory: /opt/mysql/enterprise/agent
    Monitored MySQL Database:
    Hostname or IP address:
    Port: 3306
    MySQL username: mysql_user
    MySQL password: password
    MySQL Enterprise Manager:
    Hostname or IP address:
    Tomcat Server Port: 18080
    Tomcat SSL Port: 18443
    Use SSL: 0
    Agent username: agent
    Monitored MySQL Database:
    Hostname or IP address:
    Port: 3306
    Start MySQL Enterprise Monitor Agent
    Info to start the MySQL Enterprise Monitor Agent
    The MySQL Enterprise Monitor Agent was successfully installed. To start the 
    Agent please invoke:
    /opt/mysql/enterprise/agent/etc/init.d/mysql-monitor-agent start
    Press [Enter] to continue :
    Setup has finished installing MySQL Enterprise Monitor Agent on your computer.
  13. Finally, you can read the supplied README file. The README is the share/doc/README_en.txt file within the agent installation directory.

For information on starting the agent, see Section 5.7.3, “Starting/Stopping the Agent on Unix”.