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)
If tonfisk
and flundra
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 at
C:\cluster\ndb-host-10
on host
tonfisk
, and at
C:\cluster\ndb-host-20
on
flundra
; mypackage
uses
MySQL NDB Cluster binaries installed at C:\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)
(See Section 4.3.1, “The add package
Command”, for the add
package
commands that were used to create
yourpackage
.)
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 the list 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 named mysite
; these packages are named
yourpackage
and mypackage
.
The package yourpackage
consists of the
MySQL NDB Cluster binaries in the directory
/usr/local/ndb-host-10
on host
tonfisk
, and in the directory
/usr/local/ndb-host-20
on host
flundra
. The package named
mypackage
consists of the MySQL NDB Cluster binaries in
the directory /usr/local/mysql
on host
tonfisk
, and in the directory
/usr/local/bin/mysql
on host
flundra
.
If you omit the site_name
argument,
the command fails with an error, as shown here:
mcm> list packages;
ERROR 6 (00MGR): Illegal number of operands