Oracle MySQL Server
- Product name
- Publisher page
-
- [Oracle|Oracle]
- Category
- Relational Database Management Systems
- Release
- TKU 2024-Feb-1
- More information
- Publisher link
For TKU September 2020 Extended Discovery pattern was updated (DRDC1-14748). Database Detail node was updated to contain DB Server type (DRDC1-14748). Please be aware that this update may impact CMDB syncing.
Extended Discovery pattern, which allows to model Database Detail Nodes managed by the MySQL Server is available for this product.
From TKU November 2017 onwards, the pattern will also discover Infobright Community Edition and Infobright Enterprise Edition. For more information, see Infobright Product Page.
Oracle MySQL Server software is one of the most widely used relational database management systems that runs as a server providing multi-user access to several databases. It is available in open source form and for commercial use, where several paid editions are available, and offers additional functionality.
Pattern summary
Pattern name | Operating system | Versioning | Pattern depth |
---|---|---|---|
DatabaseServer | Unix | Command (Active), Package, Path | Instance-based |
Windows | Command (Active), Registry, Package, Path |
Platforms supported by the pattern
The patterns have been created to allow each of them to support Windows, Linux, and UNIX platforms from the same module.
Identification
Triggers
OS Type | Trigger Node | Attribute | Condition | Argument |
---|---|---|---|---|
Unix | DiscoveredProcess | cmd | matches | regex'\bmysqld(?:-max)?$' |
Windows | regex'(?i)\bmysqld\S*\.exe$' |
Simple Identification mappings
The following components/processes are identified using simple identity mappings.
Name | Command |
---|---|
MySQL Database Server | regex'\bmysqld$' |
regex'\bmysqld-max$' | |
regex'(?i)\bmysqld\S*\.exe$' | |
MySQL Database Server Startup script | regex'safe_mysqld\b' |
regex'mysqld_safe\b' |
Versioning
Version information for the product is collected using one of four possible methods.
The methods are tried in order of precedence based on the likely success and accuracy of the information that can be gathered. Once a result is obtained, the methods lower in precedence are not attempted. In order of precedence the methods are:
Active Versioning
If the path to the trigger process is fully qualified, the pattern runs <trigger process> -V (e.g. /usr/sbin/mysqld -V). If the path to the trigger process is not fully qualified, the pattern gets the install root from the --basedir attribute in the trigger process arguments, then runs <install_root>/bin/<trigger process> -V. If the command fails, the pattern tries it with the privileged execution.
Registry Versioning
For the Windows only. The Registry Query functionality allows a value to be pulled from the registry, given a valid registry path. This value will then be used as the version number for the product.
The pattern queries the Windows Registry to obtain the registry listing (giving version(s) installed) from the following registry path:
HKEY_LOCAL_MACHINE\SOFTWARE\MySQL AB
If the registry listing returns a single entry, then the pattern will perform a further Windows registry query to obtain the version information. The query performed is:
HKEY_LOCAL_MACHINE\SOFTWARE\MySQL AB\<version>\Version
Note
If more than one entry is returned, registry versioning will not be performed. Atrium Discovery cannot be sure to correctly assign the version obtained from the registry to the actual instance that has been discovered.
Package Versioning
Atrium Discovery executes a search for the installed packages and tries to match them against the following regular expressions in the following order:
^(?i)MySQL$
- ^MySQL[\-\s]Server
- ^rh\-mysql\d+-mysql\-server
When it finds a match, it extracts the version for MySQL RDBMS from the package information. If more than one package matches, only the version information from the first is extracted.
Path Versioning
The Path Regex functionality allows a regular expression to be applied against the MySQL Database Server (mysqld) process command line to derive a version number from the command path or arguments.
The regular expression used is as follows:
mysql-(?:max-|standard-|)(\d\.[\.d+\]*)
Additional attributes
We can get additional attributes by parsing the trigger process arguments, the configuration file or the system variables. The pattern tries them in that order. We obtain the configuration file from the –default-file option of the trigger process arguments. If that doesn’t exist look in <install root>\\my.ini (on Windows) or /etc/my.cnf (on UNIX). Install root is obtained from the path to the trigger process. Port, bind_address and datadir are all reported in this configuration file. We can get a list of system variables from the command <install root>/mysqladmin variables or the command <install root>/mysqld –verbose --help.
Attribute | How to obtain from trigger process arguments | How to obtain from configuration file | How to obtain from system variables | Alternate methods |
---|---|---|---|---|
Instance | Generally it is the last argument in the trigger process arguments. In certain cases check the –defaults-group-suffix argument instead | |||
Port | Yes – port argument or P argument | Yes – search for “port” | Yes – port variable | Search DiscoveredListeningPorts attribute where pid is pid of the trigger process |
Bind_address | Yes – bind_address argument | Yes – search for “bind-address” | Yes – bind-address variable | |
Datadir | Yes – datadir argument | Yes – search for “datadir” | ||
Socket | Yes – socket argumemt | |||
Edition | Yes – Check version-comment variable. If the comment is “MySQL <edition value> Edition” then the edition is <edition value> |
The pattern has the MySQL Database Server (mysqld, mysqld-max or mysqld\S*\.exe) as its trigger process.
If the trigger process is a child process with the same cmd as its parent, the pattern is immediately stopped; its body will be executed later when the parent trigger process is encountered.
Application Model Produced by Software
SI Depth
The pattern generates typically an instance-based Software Instance. If the data directory path is known, then the SI key is generated based on the hashed value of this path, combined with the SI type and the host key. If the data directory is not known, but the port is known, then the key for the generated Software Instance is based on the port, the SI type, and the host key. If the instance is known but not the port and data directory, then the key for the generated Software Instance is based on the instance, the SI type, and host key. If none of these values have been discovered, a grouped SI is created with the key_group based on process cmd and full version.
The key is always constant but note that the name of the SI varies depending on how much information is necessary to identify the instance uniquely.
- It always contains software instance type and host name
- It always contains product version if it can be found
- It contains instance only if it exists and is necessary to uniquely identical the MySQL instance on the host (i.e. there are several instances installed on the same host)
- It contains a part of datadir only if several instances are installed on the same host, and datadir is the only way to distinguish between them.
Relationship Creation
If an instance-based SI is created, several relationships are also created on the UNIX/Linux platforms.
The pattern searches for all the trigger process' child processes running on the host and then associates them, as child processes, with the Software Instance.
The pattern also searches for all the trigger process' parent processes running on the host. The arguments of any parent process matching the following regular expression are then associated, as parent processes, with the Software Instance:
- (mysqld_safe|safe_mysqld)
Obtaining detailed MySQL Database and table information - Extended database discovery
A different pattern has been created to query the MySQL Database Server to obtain the database list and (optionally) database table details. For more information, see Oracle MySQL Server - Database Detail Pattern.
Comments
Log in or register to comment.