Documentation Home
MySQL 8.4 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 40.2Mb
PDF (A4) - 40.3Mb
Man Pages (TGZ) - 262.0Kb
Man Pages (Zip) - 367.6Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb


MySQL 8.4 Reference Manual  / ...  / MySQL NDB Cluster 8.4  / NDB Cluster Installation  / Installing NDB Cluster on Windows  /  Installing NDB Cluster Processes as Windows Services

25.3.2.4 Installing NDB Cluster Processes as Windows Services

Once you are satisfied that NDB Cluster is running as desired, you can install the management nodes and data nodes as Windows services, so that these processes are started and stopped automatically whenever Windows is started or stopped. This also makes it possible to control these processes from the command line with the appropriateSC START andSC STOP commands, or using the Windows graphicalServices utility.NET START andNET STOP commands can also be used.

Installing programs as Windows services usually must be done using an account that has Administrator rights on the system.

To install the management node as a service on Windows, invokendb_mgmd.exe from the command line on the machine hosting the management node, using the--install option, as shown here:

C:\> C:\mysql\bin\ndb_mgmd.exe --installInstalling service 'NDB Cluster Management Server'  as '"C:\mysql\bin\ndbd.exe" "--service=ndb_mgmd"'Service successfully installed.
Important

When installing an NDB Cluster program as a Windows service, you should always specify the complete path; otherwise the service installation may fail with the errorThe system cannot find the file specified.

The--install option must be used first, ahead of any other options that might be specified forndb_mgmd.exe. However, it is preferable to specify such options in an options file instead. If your options file is not in one of the default locations as shown in the output ofndb_mgmd.exe--help, you can specify the location using the--config-file option.

Now you should be able to start and stop the management server like this:

C:\> SC START ndb_mgmdC:\> SC STOP ndb_mgmd
Note

If usingNET commands, you can also start or stop the management server as a Windows service using the descriptive name, as shown here:

C:\> NET START 'NDB Cluster Management Server'The NDB Cluster Management Server service is starting.The NDB Cluster Management Server service was started successfully.C:\> NET STOP  'NDB Cluster Management Server'The NDB Cluster Management Server service is stopping..The NDB Cluster Management Server service was stopped successfully.

It is usually simpler to specify a short service name or to permit the default service name to be used when installing the service, and then reference that name when starting or stopping the service. To specify a service name other thanndb_mgmd, append it to the--install option, as shown in this example:

C:\> C:\mysql\bin\ndb_mgmd.exe --install=mgmd1Installing service 'NDB Cluster Management Server'  as '"C:\mysql\bin\ndb_mgmd.exe" "--service=mgmd1"'Service successfully installed.

Now you should be able to start or stop the service using the name you have specified, like this:

C:\> SC START mgmd1C:\> SC STOP mgmd1

To remove the management node service, useSC DELETEservice_name:

C:\> SC DELETE mgmd1

Alternatively, invokendb_mgmd.exe with the--remove option, as shown here:

C:\> C:\mysql\bin\ndb_mgmd.exe --removeRemoving service 'NDB Cluster Management Server'Service successfully removed.

If you installed the service using a service name other than the default, pass the service name as the value of thendb_mgmd.exe--remove option, like this:

C:\> C:\mysql\bin\ndb_mgmd.exe --remove=mgmd1Removing service 'mgmd1'Service successfully removed.

Installation of an NDB Cluster data node process as a Windows service can be done in a similar fashion, using the--install option forndbd.exe (orndbmtd.exe), as shown here:

C:\> C:\mysql\bin\ndbd.exe --installInstalling service 'NDB Cluster Data Node Daemon' as '"C:\mysql\bin\ndbd.exe" "--service=ndbd"'Service successfully installed.

Now you can start or stop the data node as shown in the following example:

C:\> SC START ndbdC:\> SC STOP ndbd

To remove the data node service, useSC DELETEservice_name:

C:\> SC DELETE ndbd

Alternatively, invokendbd.exe with the--remove option, as shown here:

C:\> C:\mysql\bin\ndbd.exe --removeRemoving service 'NDB Cluster Data Node Daemon'Service successfully removed.

As withndb_mgmd.exe (andmysqld.exe), when installingndbd.exe as a Windows service, you can also specify a name for the service as the value of--install, and then use it when starting or stopping the service, like this:

C:\> C:\mysql\bin\ndbd.exe --install=dnode1Installing service 'dnode1' as '"C:\mysql\bin\ndbd.exe" "--service=dnode1"'Service successfully installed.C:\> SC START dnode1C:\> SC STOP dnode1

If you specified a service name when installing the data node service, you can use this name when removing it as well, as shown here:

C:\> SC DELETE dnode1

Alternatively, you can pass the service name as the value of thendbd.exe--remove option, as shown here:

C:\> C:\mysql\bin\ndbd.exe --remove=dnode1Removing service 'dnode1'Service successfully removed.

Installation of the SQL node as a Windows service, starting the service, stopping the service, and removing the service are done in a similar fashion, usingmysqld--install,SC START,SC STOP, andSC DELETE (ormysqld--remove).NET commands can also be used to start or stop a service. For additional information, seeSection 2.3.3.8, “Starting MySQL as a Windows Service”.