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


3.3.2.1 Installing the MySQL Cluster Manager Agent as a Windows Service

Important

Installation of the MySQL Cluster Manager agent as a service is recommended. However, you shouldnot install MySQL NDB Cluster processes (ndb_mgmd.exe,ndbd.exe,ndbmtd.exe,mysqld.exe) as services on Windows hosts to be used as MySQL NDB Cluster nodes under management by MySQL Cluster Manager, since the MySQL Cluster Manager agent itself controls MySQL NDB Cluster nodes independently of the WindowsServices application.

After installing the MySQL Cluster Manager Agent as a Windows service, you can start and stop the agent using the WindowsServices application. The installation also configures the agent to start automatically whenever Windows starts, and to shut down safely whenever Windows shuts down.

Note

The Windows service can be used to control the running of MySQL Cluster Manager agents on a single host only. To shut down agents on multiple hosts, you can use thestop agents command in the MySQL Cluster Manager client.

The installation is performed using the command prompt (cmd.exe); as with installing or removing any Windows service, it must also be done as a user having sufficient permissions, such the system Administrator account. Follow these steps:

  • If the account you are currently using has Administrator privileges, you can simply startcmd.exe. Otherwise, you must run the command prompt program as the Administrator. To do this, first locate a shortcut to the command prompt. You can do this by typingcmd into the search box in the WindowsTaskbar, and then select from the search resultsCommand Prompt >Run as Administrator.

    If a Windows UAC dialog referring tocmd.exe appears, clickYes to allow the command prompt to run as Administrator and thus to continue. You should now have a command prompt window open on your desktop, running a session with Administrator privileges.

  • To install the MySQL Cluster Manager agent as a service, we use theSC CREATE command. This command allows us to specify a name for the service (for use withSC START andSC STOP orNET START andNET STOP commands), a display name (to be shown in theServices application), a startup mode (automatic or manual start), and a path to the executable to be run as a service. The path must also include any arguments needed by the program; in the case of MySQL Cluster Manager,mcmd.exe must be told where to find its configuration file by the--config option. Both of these paths must be absolute. Assume that you have installed MySQL Cluster Manager to the default location (C:\Program Files\MySQL\MySQL Cluster Manager\mcm9.0.1), and that itsconfiguration file is located inC:\Program Files\MySQL\MySQL Cluster Manager\mcm9.0.1\; then, the following command installs MySQL Cluster Manager as a service namedMCM, with the display nameMySQL Cluster Manager 9.0.1:

    SC CREATE "MCM" DisplayName= "MySQL Cluster Manager 9.0.1" Start= "auto"  BinPath= "C:\Program Files\MySQL\MySQL Cluster Manager\mcm9.0.1\bin\mcmd.exe   --config=\"C:\Program Files\MySQL\MySQL Cluster Manager\mcm9.0.1\mcmd.conf\""

    This command can be quite long. For enhanced legibility, we have broken it across several lines,but you should always enter it on a single line, allowing it to wrap naturally. In addition, you should keep in mind that the spaces after the equal signs following theDisplayName,Start, andBinPath arguments are required.

Starting and stopping the MySQL Cluster Manager agent Windows service.  After installing the service successfully, you can start and stop the service manually, if the need arises, with theSC START andSC STOP commands.

C:\>SC START MCMC:\>SC STOP MCM

Alternatively, use theNET START andNET STOP commands:

C:\Windows\system32>NET START MCMC:\Windows\system32>NET STOP MCM

Once the service is installed, the MySQL Cluster Manager agent starts automatically whenever Windows is started. You can verify that the service is running with the WindowsTask Manager (which can be searched and then run using the search box in the WindowsTaskbar). Open theTask Manager, and switch to theServices tab if it is not already displayed. If the MySQL Cluster Manager agent is running, you can find it in the list of services underMCM in theName, column andMySQL Cluster Manager 9.0.1 in theDescription column.

You can also verify if the service is running using the WindowsServices application(which can be searched and then run using the search box in the WindowsTaskbar). The application also allows you to start, stop, or pause the MySQL Cluster Manager agent service manually using a GUI.

Note

When first installing the MySQL Cluster Manager agent as a service, the service is not started automatically until Windows is restarted. If you do not wish to restart Windows, then you must start the service manually using eitherSC START orNET START on the command line or the graphical control provided in the WindowsServices application.

You can remove the service using theSC DELETE command and the name of the service—in this caseMCM—that was used in theSC CREATE command. If the service is running at the time thatSC DELETE is executed, the removal of the service takes effect the next time the service is stopped. In such a case, you must stop the previous instance of the service manually, and allow it to be removed, before you can reinstall the service.

Once you have installed the MySQL Cluster Manager agent and the service is running correctly, you are ready to connect to it using the MySQL Cluster Manager client. SeeSection 4.3, “Starting the MySQL Cluster Manager Client”, for information about how to do this.