4.2.4 The delete site Command

delete site site_name

The delete site command deletes an existing management site. The command does not stop or remove any agents making up the deleted site; instead, these agents continue to run, and remain available for use in other sites.

The command takes a single argument, the name of the site to be deleted. This example shows the deletion of a management site named mysite:

mcm> delete site mysite;
+---------------------------+
| Command result            |
+---------------------------+
| Site deleted successfully |
+---------------------------+
1 row in set (0.38 sec)

If the site to be deleted does not exist, the command fails with the error Command requires a site to be defined. If there are any packages referencing hosts belonging to the site, delete site fails with the error Packages exist in site site_name. The command also fails if there are defined any clusters that include hosts belonging to the site.

Note

The management client must be connected to a site in order to be able to delete it.

In addition, if you execute a delete site command with the --force option using one management agent while a different management agent is not running, you must remove the missing management agent's site files manually. For more information on site files, see Section 2.4, “MySQL Cluster Manager Configuration File”.