What you need to find is the Windows Resource Kit from some version of Windows that includes instsrv.exe and srvany.exe. It is not too picky with the actual version of Windows you run it seems, I used the Windows NT 32-bit versions of these on a 64-bit Windows 7 box, and it works just fine.
These two programs are simple and are easy to use:
- instsrv allows you to install a service, it's real simple, just run the program and it will show the options (and these are few).
- srvany allows you to run any odd program, that is not intended run as a service, do do this anyway.
F:>ResKit> instsrv mgm1 F:\ResKit\srvany.exe
F:>ResKit> instsrv ndbd1 F:\ResKit\srvany.exe
F:>ResKit> instsrv ndbd2 F:\ResKit\srvany.exe
These three services are rather boring now, they do not do anything, really. To fix this, open the registry editor (regedit) and open:
HKEY_LOCAL_MACHINE\System\CurrentControlset\services\mgm1
Now, we need to define what srvany.exe should run. In the key above, create a new key called Parameters. In this key then, create two values of the type REG_SZ:
- Application - The full path to the program srvany should run.
- AppParameters - The parameters to pass to the program srvany will run.
Application: F:\MySQL714\bin\ndb_mgmd.exe
AppParams: --config-file=F:\MySQL714\mgm1\config.ini --configdir=F:\MySQL714\mgm1
I think you see where I'm going with this, but just to be sure, this is what I set for the ndbd1 service:
Application: F:\MySQL714\bin\ndbd.exe
AppParams: --ndb_connectstring=nodeid=2;host=localhost:1186
And that's it, folks! Well, one more thing I guess, we want to install the MySQL Server as a serive also, but this knows how to install itself as a service and can also run nicely as a service, so this is easy:
F:\ResKit>F:\MySQL714\bin\mysqld --install MySQL714 --defaults-file=F:\MySQL714\my.ini
Make sure that the ini-file for the MySQL server is configured to access the cluster we just set up, and to have the ndbcluster engine enabled (for some reason, the latter is not enabled by default). Do this by editing the my.ini file used by the server (and referenced above) and add the following two lines to the [mysqld] section:
ndb-connectstring=host=localhost:1186
ndbcluster
Now we have created and configured a bunch of services for a MySQL Cluster setup, and to try it out, lets start them using the NET command line program (the SC command may also be used):
F:\ResKit> net start mgm1
F:\ResKit> net start ndbd1
F:\ResKit> net start ndbd2
F:\ResKit> net start MySQL714
Have fun! And just a word of caution: Although this works just fine for testing, note that shutdown of the ndbd and mgm services isnt really graceful here, so this is just for fun and testing. Also, ndbd and ndb_mgmd will sure be possible to run as a Windows service in their own right, in some future version of MySQL Cluster.
/Karlsson
13 comments:
Hi,
you should check the "sc" (Service Control) command, as it can be used to create, delete and control service on Windows Systems out of the box.
Jan
True, but this still assumes that the prograns are services enabled. So the SC command could do away with instsrv and net, but not, as far as I can tell, srvany.
I like to use MySQL Cluster daemon for MySQL Cluster service. I heard about this service that it is very good. Thanks a lot for sharing this information.
....Alex
online viagra
I have wanted to learn more about particular topics, but not many websites would help me out in informing me the way I expected. This left me with many question, but after reading your article, I got an answer to all my questions. You are too cool dude!!!
valentines day ideas
Generic Viagra
Wow Impressive! Your blog is very informative. However, it is pretty hard task but your post and experience serve and teach me how to handle and make it more simple and manageable.Thanks for the tips… Best regards.
cheap reseller hosting |
cpanel reseller
Vimax is reliable stuff to accomplish your sexual dysfunction. It has been proven by many men to augment virility and genital.
hey thanks for the information.. it has been of great use .. it updating more post..thanks..
regards..
astermeds.com
I have been looking for sites like this for a long time. Thank you! buy vicodin online
I wanted to thank you for this great read.I am very pleased to find this site.
Thanks for sharing!
buy codeine online
i am also loving your blog for sharing fantastic topic thanks for sharing keep it up.
Free Classified Ads
I like the valuable information you provide in your articles. I’ll bookmark your weblog and check again here frequently. I am quite sure I will learn many new stuff right here! Best of luck for the next!
best over the counter sleep aid
Post a Comment