delete package [{--hosts=|-h }host_list] package_name
host_list:
host[,host[,...]]
This command is used to unregister a package. More specifically,
it removes any references to MySQL Cluster software
installations added to the agent's repository when the
package was created. delete package
does
not remove any MySQL Cluster installations;
the command removes only references to the installations. Once a
package has been unregistered, it can no longer be used for a
create cluster
command. The
MySQL Cluster binaries remain, but cannot be used in a MySQL
Cluster administered using the MySQL Cluster Manager unless and until the base
directory containing them has been registered with another
package. (It is possible to register a base directory with
multiple packages; see Section 4.3.1, “The add package
Command”, for
more information and an example.)
If the --hosts
option (short form:
-h
) is used with this command, the base
directory settings for the host or hosts named by the option are
removed as well. All hosts given in the
host_list
must be members of the site
to which the package is registered. Otherwise, the command
fails.
A package that is in use by a cluster cannot be unregistered;
the cluster must first be deleted (see
Section 4.4.2, “The delete cluster
Command”).
Here is an example that demonstrates how to unregister a package
named mypackage
:
mcm> delete package mypackage;
+------------------------------+
| Command result |
+------------------------------+
| Package deleted successfully |
+------------------------------+
1 row in set (1.23 sec)
You can also verify that the package was unregistered using the
list packages
command; the
package name should no longer appear in the output of this
command. If you attempt to use the unregistered package in a
create cluster
command, the
command fails, as shown here:
mcm> create cluster --package=mypackage
> --processhosts=ndb_mgmd@tonfisk,ndbd@grindval,ndbd@flundra,mysqld@tonfisk mycluster;
ERROR 4001 (00MGR): Package mypackage not defined
An upgrade cluster
command that
references an unregistered package also fails.
When IPv6-enabled Windows systems are used as MySQL Cluster hosts under MySQL Cluster Manager, you must reference these hosts using IPv4 addresses. Otherwise, MySQL Cluster Manager will be unable to connect to the agent processes on those hosts. See Section 5.1, “MySQL Cluster Manager Usage and Design Limitations”.