It is possible to discover MySQL instances automatically, using OMS Auto Discovery.
To configure Auto Discovery for Oracle MySQL, do the following:
From the Setup menu, select Add Target, Configure Auto Discovery.
The Setup Discovery Page is displayed.
From the Targets on Hosts table, select the host to auto-discover.
Click Discovery Modules.
The Discovery Modules: hostname page is displayed.
Select the Oracle MySQL Discovery module.
Click OK to save your changes and continue.
The Setup Discovery page is displayed again.Note
It can take some time for the instances to be discovered.
From the Setup menu, select Auto Discover Results from the Add Target menu.
The target(s) added in the previous step are listed in the Targets on Hosts tab.
Select the host and click Promote.
The Promote Unmanaged Target page is displayed.
Populate the fields as required.Note
The Properties section is auto-populated if the permissions and users are set up correctly. If the permissions are incorrect, or the process is running under another user's account, some of these values do not auto-populate.
If both Port and Socket are populated, Port takes precedence over Socket. If you want to use socket only, you must delete the value in the Port and Host fields.
The Confirmation dialog displays the progress of the promotion and prompts when finished.
Click OK and open the All Targets page to locate the new target.
The target is named according to the following rules:
Hostname:PortNumber - If the target is listening on TCP
Hostname:SocketPath - If the target is listening over a socket.
Hostname.pid - If neither port number nor socket can be resolved, the process identifier (pid) of the monitored MySQL instance is used.Important
If the Hostname.pid naming convention is used, and the MySQL instance is restarted, a new unmanaged target is added to the results list because a new process id is assigned causing the name of the target to change.
Hostnames generated using this method are not deleted from the results list if the MySQL server is restarted and the new, generated name added to the list. You must manage the old, generated hostnames manually.