Documentation Home
MySQL Cluster Manager 8.0 User Manual
Related Documentation Download this Manual
PDF (US Ltr) - 1.3Mb
PDF (A4) - 1.3Mb


5.3.3 Thelist packages Command

list packages [package_name]site_name

This command lists registered packages. It requires a single argument, that being the name of the site with which the packages are registered, as shown in this example:

mcm> list packages mysite;+-------------+---------------------------------------+-----------------+| Package     | Path                                  | Hosts           |+-------------+---------------------------------------+-----------------+| yourpackage | /usr/local/ndb-host-10                | tonfisk         ||             | /usr/local/ndb-host-20                | flundra         || mypackage   | /usr/local/mysql                      | tonfisk,flundra |+-------------+---------------------------------------+-----------------+3 rows in set (1.07 sec)

Iftonfisk andflundra are Windows hosts, the list of packages might look something like this:

mcm> list packages mysite;+-------------+---------------------------------------+-----------------+| Package     | Path                                  | Hosts           |+-------------+---------------------------------------+-----------------+| yourpackage | c:/cluster/ndb-host-10                | tonfisk         ||             | c:/cluster/ndb-host-20                | flundra         || mypackage   | c:/mysql                              | tonfisk,flundra |+-------------+---------------------------------------+-----------------+3 rows in set (1.07 sec)

In the example just shown,yourpackage uses the MySQL NDB Cluster binaries installed atC:\cluster\ndb-host-10 on hosttonfisk, and atC:\cluster\ndb-host-20 onflundra;mypackage uses MySQL NDB Cluster binaries installed atC:\mysql on both hosts.

The output contains three columns; these are described in the following list:

  • Package The name of the package. This can sometimes be empty when a package includes MySQL NDB Cluster installations that are in different locations on different hosts (see next example).

  • Path The path to the MySQL NDB Cluster installation directory (base directory) on the indicated host or hosts. This is the same as the value given for the--basedir option in theadd package command that was used to create or augment the package.

    On Windows, paths shown in this column have any backslash characters converted to forward slashes, just as must be done for the--basedir option (see the earlier example in this section).

  • Hosts The host or hosts where the MySQL NDB Cluster installation or installations are located.

You can filter the results so that information relating to only a single package is displayed by supplying the package name before the site name, as shown here:

mcm> list packages yourpackage mysite;+-------------+---------------------------------------+-----------------+| Package     | Path                                  | Hosts           |+-------------+---------------------------------------+-----------------+| yourpackage | /usr/local/ndb-host-10                | tonfisk         ||             | /usr/local/ndb-host-20                | flundra         |+-------------+---------------------------------------+-----------------+2 rows in set (0.55 sec)

(SeeSection 5.3.1, “Theadd package Command”, for theadd package commands that were used to createyourpackage.)

When a package contains MySQL NDB Cluster installations using different base directories on different hosts, each unique combination of path and host is shown in its own row. However, the name of the package is displayed in the first row only; all rows that immediately follow this row and that do not contain the package name also relate to the same package whose name is shown in the first preceding row to display a package name. For example, consider thelist packages command and output shown here:

mcm> list packages mysite;+-------------+---------------------------------------+---------+| Package     | Path                                  | Hosts   |+-------------+---------------------------------------+---------+| yourpackage | /usr/local/ndb-host-10                | tonfisk ||             | /usr/local/ndb-host-20                | flundra || mypackage   | /usr/local/mysql                      | tonfisk ||             | /usr/local/bin/mysql                  | flundra |+-------------+---------------------------------------+---------+3 rows in set (1.07 sec)

This output shows that there are two packages defined for the site namedmysite; these packages are namedyourpackage andmypackage. The packageyourpackage consists of the MySQL NDB Cluster binaries in the directory/usr/local/ndb-host-10 on hosttonfisk, and in the directory/usr/local/ndb-host-20 on hostflundra. The package namedmypackage consists of the MySQL NDB Cluster binaries in the directory/usr/local/mysql on hosttonfisk, and in the directory/usr/local/bin/mysql on hostflundra.

If you omit thesite_name argument, the command fails with an error, as shown here:

mcm> list packages;ERROR 6 (00MGR): Illegal number of operands