• Loading...

MySQL RDBMS

Discover with BMC ADDM
download

This product can be discovered by any edition of BMC Atrium Discovery and Dependency Mapping. Download our free Community Edition to try it out, or see what else it can discover!

What is this?
This is a product information page, containing details of the information that BMC Atrium Discovery gathers about a product and how it is obtained.
Product Name
MySQL
Publisher Page

MySQL AB

Category

Relational Database Management Systems

Release
TKU 2011-Sep-1
Change History

MySQL AB MySQL - Change History

Reports & Attributes

MySQL AB MySQL - Reports & Attributes

Publisher Link
MySQL AB

Product Description

MySQL Enterprise Server software is the most reliable, secure and up-to-date version of MySQL for cost-effectively delivering E-commerce, Online Transaction Processing (OLTP), and multi-terabyte Data Warehousing applications. It is a fully integrated transaction-safe, ACID compliant database with full commit, rollback, crash recovery and row level locking capabilities. MySQL delivers the ease of use, scalability, and performance that has made it the world's most popular open source database.

Known Versions

  • 3.23
  • 4.0
  • 4.1
  • 5.0
  • 5.1

Software Pattern Summary

Product Component OS Type 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 in a manner that allows each of them to support Windows, Linux and Unix platforms from the same module.

Identification

Software Instance 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 the combination of pattern definitions and simple identity mappings which map other known (but deemed less important in terms of application modeling) processes.

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 currently collected using one of four possible methods.

The methods are tried in an order of precedence based on likely success and/or 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

We first of all check that the command line contains a full path to the trigger process by applying the command line to one of the following regular expressions (the first for Windows and the second for Unix/Linux):

* ^(\w:\\.+?)$
  • ^(/.+?)$

If the full path to the process can be established, the following command is executed:

  • %process.cmd% -V

The output is then applied against the following regular expression to extract the version:

  • \s[vV]er\s*(\d+(?:\.\d+)*)

Registry Versioning

Windows only

The Registry Query functionality allows for 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 for the value to one of the following Registry keys. Each is tried in turn, in the order shown, until a match occurs or the list is exhausted:

  • HKEY_LOCAL_MACHINE\SOFTWARE\MySQL AB\MySQL Server 4.1\Version
  • HKEY_LOCAL_MACHINE\SOFTWARE\MySQL AB\MySQL Server 5.0\Version
  • HKEY_LOCAL_MACHINE\SOFTWARE\MySQL AB\MySQL Server 5.1\Version

The first Registry key to match will return the version number of MySQL RDBMS that is running on the system. Using this method produces accurate version numbers for Windows products.

Package Versioning

Foundation executes a search for the installed packages and tries to match them against the following regular expressions in the order in which they are presented below:

  • (?i)^MySQL$
  • (?i)^MySQL[-s]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+]*)

Application Model Produced by Software Pattern

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.

Additional Attributes of the Software Instance created

Port information

On Windows the pattern attempts to discover the database listening port information from the my.ini file.

  • The process command's arguments are parsed using one of the following regular expressions to obtain the full path to my.ini:
  • "--defaults-file=(.+?)"
  • --defaults-file=([^"s]+)
  • --defaults-file="([^"]+)"

If the argument, --defaults-file, is not present in the command line's arguments, the process command is parsed using the following regular expression to obtain the directory of my.ini:

* (?i)(\w:.+)\\bin

my.ini is then parsed using the following regular expression to obtain the port information:

* \[mysqld\](?:.*\n)*?port=(\d+)

On UNIX platforms, to obtain the listening port information the pattern executes the following command:
<abs. path to the trigger process binary>/mysqld --verbose --help | grep port

The output is parsed using the following regular expression:
\nport\W*(\d+)

Bind Address

On Windows the pattern attempts to obtain the bind address by parsing the my.ini file with the following regular expression

  • bind-address\s*=\s*((?:\d+\.){3}\d+)

For full details of how the my.ini file is obtained, please refer to the section on port information

On UNIX, the pattern parses the output of the following command with the following regular expression:

  • Command: <abs. path to the trigger process binary>/mysqld --verbose --help | grep bind-address
  • Regular expression: bind-address\s*((?:\d+\.){3}\d+)
Note: bind address is given for information only. The pattern is only able to directly query a database if it has the same IP address as the host

Socket Information

The pattern tries to establish what socket the application is connected to by applying the command line arguments against one of the following regular expressions (the first for Unix and the second for Windows):

  • socket=(\S+)
  • socket=(.+)\s

Datadir

The pattern tries to establish the data directory by applying the command line arguments against one of the following regular expressions:

UNIX

  • datadir=(\S+)

Windows

  • (?i)datadir="([^"]+)"
  • (?i)datadir=(\S+)

If datadir cannot be established by the above methods on the Windows platform, the command line is applied against the following regular expression:

* ^(?i)(\w:.+)\\bin

to discover MySQL's root directory. It then reads a configuration file named 'my.ini' in MySQL's root directory and applies its contents against the following regular expression to discover datadir:

  • '(?i)^datadir="?(.+?)["\r]'

The information obtained is assigned to the db_path attribute on the SI created

SI Depth

The pattern generates an instance-based Software Instance. If port is known, then the key for the generated Software Instance is based on the port, type (MySQL Database Server) and host key. If port is not known, then the key_group is based on process cmd and full version.

Relationship Creation

If key is based on port, then a number of relationships are also created.

On the Unix/Linux platform, the pattern performs a search for all the trigger process' child processes running on the host, and then associates them, as child processes, with the Software Instance.

On the same platform, the pattern also performs a search 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

A separate pattern has been created to query the MySQL Database Server in order to obtain database list and (optionally) database table details. For more information about this pattern, please refer to the relevant page

Differences to 6.x Approach

In the Foundation 6.x SPVI, port information was extracted from the command line arguments. In the Foundation 7.x the port information is extracted from the my.ini file (on Windows) or from the result of the --verbose --help command (on UNIX).

Subject Matter Expertise

Testing

Testing has been performed against both a live installation on Linux and Windows and customer record data

Information Sources

Open Issues

TOP

Created by: Rebecca 10:40, 26 November 2007 (GMT)

Reviewed by: Rebecca 13:44, 17 November 2008 (GMT)

Amended by: Chris 15:54 11 November 2008 (GMT)

Amended by: Chris 11:38 8 December 2008 (GMT)

Updated by: Rebecca 15:05, 27 January 2009 (GMT)

Updated by: Rebecca 11:21, 25 June 2009 (GMT)

Updated by: Rebecca 11:12, 12 April 2010 (GMT)

Updated by: Chris 14:15, 6 May 2010 (GMT)

Skip to end of metadata
Go to start of metadata
Labels:
products products Delete
package_versioning package_versioning Delete
path_versioning path_versioning Delete
active_versioning active_versioning Delete
additional_attributes additional_attributes Delete
active_command active_command Delete
configuration configuration Delete
open_source open_source Delete
registry_versioning registry_versioning Delete
relational_database_management_systems relational_database_management_systems Delete
mysql_ab mysql_ab Delete
tku_2011-sep-1 tku_2011-sep-1 Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.