The MySQL Plug-in for Oracle Grid Control — Installation

The MySQL Management Plug-in for Oracle 10g Enterprise Manager is distributed in a Management Plug-in Archive (MPA) — a .jar file that can include one or more Management Plug-ins (MP).

Oracle 10g Grid Control provides centralized management of MPs. Plug-ins are uploaded to the central repository using the Grid Control web console and then deployed on the agents that need to monitor these targets. After deployment, an administrator can add new targets. With the MySQL Plug-in, the agent can run on the same host as a MySQL database, or on a remote machine monitoring a number of MySQL databases.

Importing the Plug-In to the Management Server

Login to Grid Control web console as Super Administrator and use the following sequence:

  1. Go to setup (top-right corner of every page).
  2. Navigate to “Management Plug-ins” on the left sidebar menu.
  3. Click the “Import” button; the “Import Management Plug-ins” page comes up.
  4. Enter the path to the downloaded MPA .jar file (use the “Browse” button) and click the “List Archive” button; the page will reload, bringing up the list of available plug-ins in the MPA.
  5. Select the version of the plug-in to import (there is usually only one), and click “OK”.
MySQL plug-in import screen

Import usually takes just a few seconds, and then you should be back to the “Management Plug-ins” screen which will look like this:

MySQL plug-in imported

Deployment to Agents

Before you could deploy plug-in to the Oracle Management Agents you should set preferred credentials for these agents. To do so, go to “Preferences” (top right corner) -> “Preferred Credentials” (sidebar on the left) -> click on the icon in the last column for the “Agents” row -> set credentials for each agent your would be deploying the plug-in to. Thus should be the OS user that is running Oracle Management Agent. Usually, it would be “oracle” user for *nix installations. If you don’t perform this step, you would get an error “The preferred credentials are not set for {agent:port}“.

From the “Management Plug-ins” page where you just imported the plug-in, click on the deploy button and add agents on the next screen using the “Add Agents” button. Note that the window with the list of agent doesn’t list any by default, and you need to click the “Go” button even if you leave the search condition empty.

This is the most critical part, and if it succeeds, you should see a non-zero number in the column “Deployed Agents” back on the Management Plug-ins page. Otherwise, it will contain the error message on the top of the page.

For details of the error, please refer to the Oracle Management Server (OMS) log file: $OMS_HOME/sysman/log/emoms.log.

Note that Oracle Grid Control will transparently upgrade or downgrade the plug-in if an agent has already had another version deployed unless plug-in versions are not compatible; see version release notes.

Adding MySQL targets

It’s finally the time to add your MySQL databases the Grid Control. If you were upgrading from a previous version, nothing needs to be done with the existing targets — everything will have been taken care of during the previous deployment process.

Navigate to the agent that will monitor MySQL database you are adding (one way is through “Setup” -> “Agents”). On the agent’s home page in the “Monitored Targets” section, select “MySQL Server” in the drop-down list and click the “Go” button next to it.

This will bring up the “Add MySQL Server” page, where you will need to provide the target name (unique across all targets in Grid Control) and full several instance properties:

  • Unix socket (optional) — the path to Unix socket file to monitor local MySQL; socket is only used when Hostname is not defined; default — /tmp/mysql.sock
  • Hostname (optional) — the IP address or hostname to connect to the MySQL database; Unix socket is used if this property is left empty
  • Port (optional) — MySQL’s port for connection if it’s not the default (3306)
  • MySQL Username (optional) — the MySQL database user; default — OS user running an Agent
  • Password (optional) — the MySQL database user password; default — no password is used

MySQL user and/or password can be left empty, depending on your security setup, but I strongly suggest you use them. I suggest to create a dedicated MySQL user. All it needs to do is to be able to connect and run these statements:

show global status
show processlist
show global variables

That basically means PROCESS privilege:

GRANT PROCESS ON *.* TO {username}