<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Andrew Morgan's MySQL Cluster Database Blog &#187; Windows</title>
	<atom:link href="http://www.clusterdb.com/tag/windows/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.clusterdb.com</link>
	<description>MySQL Cluster database &#38; MySQL Replication</description>
	<lastBuildDate>Mon, 23 Aug 2010 17:30:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Running MySQL Cluster over multiple Windows servers</title>
		<link>http://www.clusterdb.com/mysql-cluster/running-mysql-cluster-over-multiple-servers/</link>
		<comments>http://www.clusterdb.com/mysql-cluster/running-mysql-cluster-over-multiple-servers/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 17:57:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL Cluster]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL Cluster 7.0]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.clusterdb.com/?p=807</guid>
		<description><![CDATA[Following on from the earlier article on running MySQL Cluster on a single Windows host, this one looks at installing and running over multiple Windows machines. Note that MySQL Cluster is still for development use only on Windows &#8211; use LINUX or Solaris for live deployments. For the latest status of which platforms are supported [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.clusterdb.com/wp-content/uploads/2009/12/Windows_logo.jpg"><img class="alignright size-full wp-image-809" title="Windows Logo" src="http://www.clusterdb.com/wp-content/uploads/2009/12/Windows_logo.jpg" alt="Windows Logo" width="107" height="107" /></a><br />
Following on from the earlier article on <a href="http://www.clusterdb.com/mysql-cluster/my-first-cluster-running-on-windows/" target="_blank">running MySQL Cluster on a single Windows host</a>, this one looks at installing and running over multiple Windows machines.</p>
<p><strong>Note that MySQL Cluster is still for development use only on Windows &#8211; use LINUX or Solaris for live deployments. </strong>For the latest status of which platforms are supported for development and deployment, refer to the <a href="http://www.mysql.com/support/supportedplatforms/cluster.html" target="_blank">Supported Platforms matrix</a>.</p>
<div id="attachment_800" class="wp-caption alignright" style="width: 264px"><a href="http://www.clusterdb.com/wp-content/uploads/2009/12/windows.jpg"><img class="size-medium wp-image-800" title="MySQL Cluster Running on Windows" src="http://www.clusterdb.com/wp-content/uploads/2009/12/windows-254x300.jpg" alt="Target Deployment" width="254" height="300" /></a><p class="wp-caption-text">Target Deployment</p></div>
<p>In this post, the MySQL Cluster database will be split over 3 Windows machines:</p>
<ul>
<li>2 hosts with each running 1 data node</li>
<li>3rd host running management node and 2 MySQL Servers</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_814" class="wp-caption alignright" style="width: 310px"><a href="http://www.clusterdb.com/wp-content/uploads/2009/12/download.jpg"><img class="size-medium wp-image-814" title="MySQL Cluster Downloads" src="http://www.clusterdb.com/wp-content/uploads/2009/12/download-300x236.jpg" alt="MySQL Cluster Downloads" width="300" height="236" /></a><p class="wp-caption-text">MySQL Cluster Downloads</p></div>
<p>The first step is to download and install the software on each of the Windows hosts. There are 2 main ways that you can install MySQL Cluster on Windows &#8211; the first is an MSI installer and the second is extracting the files from a Zip archive &#8211; this article focuses on using the Zip file as the <a href="http://www.clusterdb.com/mysql-cluster/my-first-cluster-running-on-windows/" target="_blank">single host article</a> used the MSI installer. You can get the Zip archive from the <a href="http://dev.mysql.com/downloads/cluster/" target="_blank">Cluster downloads page on mysql.com</a></p>
<p>Make sure that you choose the correct file MSI vs. Zip, 32 bit vs. 64 bit. Also make sure that you don&#8217;t download the source code rather than the binaries (you can tell the source archive as it&#8217;s a much smaller file).</p>
<p>Repeat this on each of the hosts that will run a Cluster node (or download it once and then copy it to each of the hosts).</p>
<div id="attachment_832" class="wp-caption alignright" style="width: 310px"><a href="http://www.clusterdb.com/wp-content/uploads/2009/12/zip.jpg"><img class="size-medium wp-image-832" title="zip" src="http://www.clusterdb.com/wp-content/uploads/2009/12/zip-300x212.jpg" alt="Extract Zip archive" width="300" height="212" /></a><p class="wp-caption-text">Extract Zip archive</p></div>
<p>Extract the contents of the Zip archive to &#8220;c:\mysql\cluster&#8221;.</p>
<p>I prefer to keep the configuration and data files separate from the software and so I create a new folder &#8220;MySQL_Cluster\My_Cluster&#8221; in my home directory and in there create &#8220;conf&#8221; and &#8220;data&#8221; folders. Within the &#8220;data&#8221; folder on 192.168.0.19, create a sub-folder for each of the 2 MySQL Server (mysqld) processes and then copy &#8220;c:\mysql\cluster\data\mysql&#8221; to each &#8211; this creates the mysql database for each of the MySQL nodes containing data such as privileges and password.</p>
<div id="attachment_834" class="wp-caption alignright" style="width: 310px"><a href="http://www.clusterdb.com/wp-content/uploads/2009/12/path.jpg"><img class="size-medium wp-image-834" title="path" src="http://www.clusterdb.com/wp-content/uploads/2009/12/path-300x275.jpg" alt="Add MySQL executables to PATH" width="300" height="275" /></a><p class="wp-caption-text">Add MySQL executables to PATH</p></div>
<p>To get access to the executables from the command line, add &#8220;c:\mysql\cluster\bin&#8221; to the PATH environment variable.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Create a &#8220;config.ini&#8221; file within the &#8220;conf&#8221; folder that was created on the host to run the management node (ndb_mgmd) &#8211; which in this example is 192.168.0.19:</p>
<pre style="padding-left: 30px;"><span style="color: #993300;">[ndbd default]
noofreplicas=2
datadir=E:\am233268\Documents\MySQL_Cluster\My_Cluster\data\

[ndbd]
hostname=192.168.0.201
id=2

[ndbd]
hostname=192.168.0.4
id=3

[ndb_mgmd]
id=1
hostname=192.168.0.19

mysqld]
id=101
hostname=192.168.0.19

[mysqld]
id=102
hostname=192.168.0.19
</span></pre>
<p>As both of the MySQL Server nodes will also run on 192.168.0.19, we create a cnf file for each of them in that same &#8220;conf&#8221; folder:</p>
<p>my.101.cnf</p>
<pre style="padding-left: 30px;"><span style="color: #993300;">[mysqld]
ndb-nodeid=101
ndbcluster
datadir=E:\am233268\Documents\MySQL_Cluster\My_Cluster\data\mysqld_1
port=3306
ndb-connectstring=192.168.0.19:1186</span></pre>
<p>my.102.cnf</p>
<pre style="padding-left: 30px;"><span style="color: #993300;">[mysqld]
ndb-nodeid=102
ndbcluster
datadir=E:\am233268\Documents\MySQL_Cluster\My_Cluster\data\mysqld_2
port=3307
ndb-connectstring=192.168.0.19:1186</span></pre>
<p>Note that the &#8220;ndb-connectstring&#8221; is not strictly needed as the MySQL Servers happen to be on the same host as the management node but they&#8217;ve been included to make it clearer what to change if you moved those nodes to another machine.</p>
<div id="attachment_838" class="wp-caption alignright" style="width: 310px"><a href="http://www.clusterdb.com/wp-content/uploads/2009/12/ports.jpg"><img class="size-medium wp-image-838" title="ports" src="http://www.clusterdb.com/wp-content/uploads/2009/12/ports-300x121.jpg" alt="Ports to open for MySQL Cluster nodes" width="300" height="121" /></a><p class="wp-caption-text">Ports to open for MySQL Cluster nodes</p></div>
<p>The information from this table can help you set up the firewall rules to allow the nodes to communitcate with each other but if possible, turn off the firewall for connections between these 3 nodes.</p>
<p>The next step is to start the nodes (processes) but before then, a hint.</p>
<p>If you run each command from a different command prompt then your screen will quickly fill with Windows. Instead, rather than just typing &#8220;c:\ &lt;command&gt;&#8221; use &#8220;c:\ start /B &lt;command&gt;&#8221; (for example &#8220;c:\ start /B ndbd &#8211;initial&#8221;) so that multiple processes can be run from the same Window. To keep things simple, the &#8220;start /B&#8221; has been skipped for the rest of this article.</p>
<p>The first process to start is the management node; run the following from the &#8220;&lt;home&gt;\Documents\MySQL_Cluster\My_Cluster&#8221; folder on 192.168.0.19:</p>
<pre style="padding-left: 30px;"><span style="color: #993300;">192.168.0.19: ndb_mgmd --initial -f conf/config.ini --configdir=./conf</span></pre>
<p>Next, start the data nodes on 192.168.0.201 and 192.168.0.4:</p>
<pre style="padding-left: 30px;"><span style="color: #993300;">192.168.0.201: ndbd -c 192.168.0.19:1186 --initial

192.168.0.4: ndbd -c 192.168.0.19:1186 --initial</span></pre>
<p>and then finally start the MySQL Server nodes on 192.168.0.19:</p>
<pre style="padding-left: 30px;"><span style="color: #993300;">192.168.0.19: mysqld --defaults-file=conf\my.101.cnf
192.168.0.19: mysqld --defaults-file=conf\my.102.cnf</span></pre>
<p>Finally, check that all of the nodes are up and running:</p>
<pre style="padding-left: 30px;"><span style="color: #993300;">192.168.0.19: ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm&gt; show
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=2    @192.168.0.201  (mysql-5.1.39 ndb-7.0.9, Nodegroup: 0, Master)
id=3    @192.168.0.4  (mysql-5.1.39 ndb-7.0.9, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @192.168.0.19  (mysql-5.1.39 ndb-7.0.9)

[mysqld(API)]   2 node(s)
id=101  @192.168.0.19  (mysql-5.1.39 ndb-7.0.9)
id=102  @192.168.0.19  (mysql-5.1.39 ndb-7.0.9)</span></pre>
<h3>Known limitation of running MySQL Cluster on Windows:</h3>
<ul>
<li>No angel process for data nodes -&gt; processes will not be automatically restarted even if you set StopOnError to FALSE</li>
<li>Running nodes as Windows services is not really practical (as well as software limitations, would still need to activate processes through ndb_mgm)</li>
<li>Safe to run management node or MySQL Servers (or NDB API Apps) on Windows in production: will soon be supported</li>
<li>See open <a href="http://bugs.mysql.com/search.php?search_for=&amp;status=Active&amp;severity=&amp;limit=10&amp;order_by=&amp;cmd=display&amp;direction=ASC&amp;bug_type=Server:+Cluster&amp;assign=&amp;os=7&amp;phpver=&amp;bug_age=0 " target="_blank">MySQL Cluster bugs reported for Windows:</a></li>
<li>You tell us! Help us get to GA quality on Windows:
<ul>
<li><a href="http://bugs.mysql.com" target="_blank">bugs.mysql.com</a>
<ul>
<li>Category = MySQL Cluster</li>
<li>OS = Microsoft Windows</li>
</ul>
</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterdb.com/mysql-cluster/running-mysql-cluster-over-multiple-servers/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>MySQL Cluster running on Windows &#8211; new Webinar</title>
		<link>http://www.clusterdb.com/mysql-cluster/mysql-cluster-running-on-windows-new-webinar/</link>
		<comments>http://www.clusterdb.com/mysql-cluster/mysql-cluster-running-on-windows-new-webinar/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 17:58:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL Cluster]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.clusterdb.com/?p=801</guid>
		<description><![CDATA[Replay now available from http://www.mysql.com/news-and-events/on-demand-webinars/display-od-445.html I&#8217;ll be presenting a (free) webinar on installing, configuring and running MySQL Cluster on Windows &#8211; starting at 10:00 PT on 7th January &#8211; that&#8217;s 18:00 UK time or 19:00 for most of Europe. To attend, just register ahead of time at mysql.com In this presentation we will explore the [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_800" class="wp-caption alignright" style="width: 264px"><a href="http://www.clusterdb.com/wp-content/uploads/2009/12/windows.jpg"><img class="size-medium wp-image-800" title="MySQL Cluster Running on Windows" src="http://www.clusterdb.com/wp-content/uploads/2009/12/windows-254x300.jpg" alt="MySQL Cluster Running on Windows" width="254" height="300" /></a><p class="wp-caption-text">MySQL Cluster Running on Windows</p></div>
<p>Replay now available from <a href="http://www.mysql.com/news-and-events/on-demand-webinars/display-od-445.html" target="_blank">http://www.mysql.com/news-and-events/on-demand-webinars/display-od-445.html</a></p>
<p>I&#8217;ll be presenting a (free) webinar on installing, configuring and running MySQL Cluster on Windows &#8211; starting at 10:00 PT on 7th January &#8211; that&#8217;s 18:00 UK time or 19:00 for most of Europe. To attend, just register ahead of time at <a href="http://www.mysql.com/news-and-events/web-seminars/display-445.html" target="_blank">mysql.com</a></p>
<p>In this presentation we will explore the benefits of leveraging MySQL Cluster on Windows. We will also cover step by step, how to get started with installing, configuring, and running MySQL Cluster on Windows. Finally, a review of MySQL Cluster&#8217;s architecture and future roadmap for Windows support will be covered. If you are interested in learning how to leverage MySQL Cluster on Windows, this webinar is for you.</p>
<p>Thursday, January 07, 2010: 10:00 Pacific time (America)<br />
Thu, Jan 07: 08:00 Hawaii time<br />
Thu, Jan 07: 11:00 Mountain time (America)<br />
Thu, Jan 07: 12:00 Central time (America)<br />
Thu, Jan 07: 13:00 Eastern time (America)<br />
Thu, Jan 07: 18:00 UTC<br />
Thu, Jan 07: 18:00 Western European time<br />
Thu, Jan 07: 19:00 Central European time<br />
Thu, Jan 07: 20:00 Eastern European time</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterdb.com/mysql-cluster/mysql-cluster-running-on-windows-new-webinar/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My first Cluster running on Windows</title>
		<link>http://www.clusterdb.com/mysql-cluster/my-first-cluster-running-on-windows/</link>
		<comments>http://www.clusterdb.com/mysql-cluster/my-first-cluster-running-on-windows/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 19:53:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL Cluster]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL Cluster 7.0]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.clusterdb.com/?p=153</guid>
		<description><![CDATA[I figured that it was time to check out how to install, configure, run and use MySQL Cluster on Windows. To keep things simple, this first Cluster will all run on a single host but includes these nodes: 1 Management node (ndb_mgmd) 2 Data nodes (ndbd) 3 MySQL Server (API) nodes (mysqld) Downloading and installing [...]]]></description>
			<content:encoded><![CDATA[<p>I figured that it was time to check out how to install, configure, run and use MySQL Cluster on Windows. To keep things simple, this first Cluster will all run on a single host but includes these nodes:</p>
<ul>
<li>1 Management node (ndb_mgmd)</li>
<li>2 Data nodes (ndbd)</li>
<li>3 MySQL Server (API) nodes (mysqld)</li>
</ul>
<h3>Downloading and installing</h3>
<p>Browse to the <a href="http://dev.mysql.com/downloads/cluster/7.0.html#win32" target="_blank">Windows section of the MySQL Cluster 7.0 download page</a> and download the installer (32 or 64 bit).</p>
<div id="attachment_157" class="wp-caption alignright" style="width: 310px"><a href="http://www.clusterdb.com/wp-content/uploads/2009/06/custom_install.jpg"><img class="size-medium wp-image-157" title="custom_install" src="http://www.clusterdb.com/wp-content/uploads/2009/06/custom_install-300x227.jpg" alt="MySQL Cluster Windows Installer" width="300" height="227" /></a><p class="wp-caption-text">MySQL Cluster Windows Installer</p></div>
<p>Run the .msi file and choose the &#8220;Custom&#8221; option. Don&#8217;t worry about the fact that it&#8217;s branded as &#8220;MySQL Server 7.0&#8243; and that you&#8217;ll go on to see adverts for MySQL Enterprise &#8211; that&#8217;s just an artefact of how the installer was put together.</p>
<p>On the next screen, I decided to change the &#8220;Install to&#8221; directory to &#8220;c:\mysql&#8221; &#8211; not essential but it saves some typing later.</p>
<p>Go ahead and install the software and then you&#8217;ll be asked if you want to configure the server &#8211; uncheck that as we&#8217;ll want to tailor the configuration so that it works with our Cluster.</p>
<p>There are a couple of changes you need to make to your Windows configuration before going any further:</p>
<ol>
<li>Add the new bin folder to your path (in my case &#8220;C:\mysql\bin&#8221;)</li>
<li>Make hidden files visible (needed in order to set up multiple MySQL Server processes on the same machine)</li>
</ol>
<h3>Configure and run the Cluster</h3>
<p>Copy the contents of &#8220;C:\ProgramData\MySQL\MySQL Server 7.0\data&#8221; to &#8220;C:\ProgramData\MySQL\MySQL Server 7.0\data4&#8243;, &#8220;C:\ProgramData\MySQL\MySQL Server 7.0\data5&#8243; and &#8220;C:\ProgramData\MySQL\MySQL Server 7.0\data6&#8243;. <strong>Note that this assumes that you&#8217;ve already made hidden files visible.</strong> Each of these folders will be used by one of the mysqld processes.</p>
<p>Create the folder &#8220;c:\mysql\cluster&#8221; and then create the following files there:</p>
<p style="PADDING-LEFT: 30px"><strong>config.ini</strong></p>
<pre style="padding-left: 60px; font-size: 11px"><span style="color: #333399;">[ndbd default]
noofreplicas=2</span></pre>
<pre style="padding-left: 60px; font-size: 11px"><span style="color: #333399;">[ndbd]
hostname=localhost
id=2</span></pre>
<pre style="padding-left: 60px; font-size: 11px"><span style="color: #333399;">[ndbd]
hostname=localhost
id=3</span></pre>
<pre style="padding-left: 60px; font-size: 11px"><span style="color: #333399;">[ndb_mgmd]
id = 1
hostname=localhost</span></pre>
<pre style="padding-left: 60px; font-size: 11px"><span style="color: #333399;">[mysqld]
id=4
hostname=localhost</span></pre>
<pre style="padding-left: 60px; font-size: 11px"><span style="color: #333399;">[mysqld]
id=5
hostname=localhost</span></pre>
<pre style="padding-left: 60px; font-size: 11px"><span style="color: #333399;">[mysqld]
id=6
hostname=localhost</span></pre>
<p style="PADDING-LEFT: 30px"><strong>my.4.cnf</strong></p>
<pre style="padding-left: 60px; font-size: 11px"><span style="color: #333399;">[mysqld]
ndb-nodeid=4
ndbcluster
datadir="C:\ProgramData\MySQL\MySQL Server 7.0\data4"
port=3306
server-id=3306</span></pre>
<p style="PADDING-LEFT: 30px"><strong>my.5.cnf</strong></p>
<pre style="padding-left: 60px; font-size: 11px"><span style="color: #333399;">[mysqld]
ndb-nodeid=5
ndbcluster
datadir="C:\ProgramData\MySQL\MySQL Server 7.0\data5"
port=3307
server-id=3307</span></pre>
<p style="PADDING-LEFT: 30px"><strong>my.6.cnf</strong></p>
<pre style="padding-left: 60px; font-size: 11px"><span style="color: #333399;">[mysqld]
ndb-nodeid=6
ndbcluster
datadir="C:\ProgramData\MySQL\MySQL Server 7.0\data6"
port=3308
server-id=3308</span></pre>
<p>Those files configure the nodes that make up the Cluster.</p>
<p>From a command prompt window, launch the management node:</p>
<pre style="padding-left: 30px; font-size: 11px"><span style="color: #993300;">C:\Users\Andrew&gt;cd \mysql\cluster
C:\mysql\cluster&gt;ndb_mgmd -f config.ini
2009-06-16 20:01:20 [MgmSrvr] INFO     -- NDB Cluster Management Server. mysql-5.1.34 ndb-7.0.6
2009-06-16 20:01:20 [MgmSrvr] INFO     -- The default config directory 'c:\mysql\mysql-cluster' does not exist. Trying to create it...
2009-06-16 20:01:20 [MgmSrvr] INFO     -- Sucessfully created config directory
2009-06-16 20:01:20 [MgmSrvr] INFO     -- Reading cluster configuration from 'config.ini'</span></pre>
<p>and then from another window, check that the cluster has been defined:</p>
<pre style="padding-left: 30px; font-size: 11px"><span style="color: #993300;"> C:\Users\Andrew&gt;ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm&gt; show
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=2 (not connected, accepting connect from localhost)
id=3 (not connected, accepting connect from localhost)</span></pre>
<pre style="padding-left: 30px; font-size: 11px"><span style="color: #993300;">[ndb_mgmd(MGM)] 1 node(s)
id=1    @localhost  (mysql-5.1.34 ndb-7.0.6)</span></pre>
<pre style="padding-left: 30px; font-size: 11px"><span style="color: #993300;">[mysqld(API)]   3 node(s)
id=4 (not connected, accepting connect from localhost)
id=5 (not connected, accepting connect from localhost)
id=6 (not connected, accepting connect from localhost)</span></pre>
<p>Fire up 2 more command prompt windows and launch the 2 data nodes:</p>
<pre style="padding-left: 30px; font-size: 11px"><span style="color: #993300;">C:\Users\Andrew&gt;ndbd
2009-06-16 20:08:57 [ndbd] INFO     -- Configuration fetched from 'localhost:118
6', generation: 1
2009-06-16 20:08:57 [ndbd] INFO     -- Ndb started
NDBMT: non-mt
2009-06-16 20:08:57 [ndbd] INFO     -- NDB Cluster -- DB node 2
2009-06-16 20:08:57 [ndbd] INFO     -- mysql-5.1.34 ndb-7.0.6 --
2009-06-16 20:08:57 [ndbd] INFO     -- Ndbd_mem_manager::init(1) min: 84Mb initi
al: 104Mb
Adding 104Mb to ZONE_LO (1,3327)
2009-06-16 20:08:57 [ndbd] INFO     -- Start initiated (mysql-5.1.34 ndb-7.0.6)
WOPool::init(61, 9)
RWPool::init(22, 13)
RWPool::init(42, 18)
RWPool::init(62, 13)
Using 1 fragments per node
RWPool::init(c2, 18)
RWPool::init(e2, 14)
WOPool::init(41, 8 )
RWPool::init(82, 12)
RWPool::init(a2, 52)
WOPool::init(21, 5)</span></pre>
<p>(repeat from another new window for the second data node).</p>
<p>After both data nodes (ndbd) have been launched, you should be able to see them through the management client:</p>
<pre style="padding-left: 30px; font-size: 11px"><span style="color: #993300;">ndb_mgm&gt; show
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=2    @127.0.0.1  (mysql-5.1.34 ndb-7.0.6, Nodegroup: 0, Master)
id=3    @127.0.0.1  (mysql-5.1.34 ndb-7.0.6, Nodegroup: 0)</span></pre>
<pre style="padding-left: 30px; font-size: 11px"><span style="color: #993300;">[ndb_mgmd(MGM)] 1 node(s)
id=1    @127.0.0.1  (mysql-5.1.34 ndb-7.0.6)</span></pre>
<pre style="padding-left: 30px; font-size: 11px"><span style="color: #993300;">[mysqld(API)]   3 node(s)
id=4 (not connected, accepting connect from localhost)
id=5 (not connected, accepting connect from localhost)
id=6 (not connected, accepting connect from localhost)</span></pre>
<p>Finally, the 3 MySQL Server/API nodes should be lauched from 3 new windows:</p>
<pre style="PADDING-LEFT: 30px; font-size: 11px"><span style="color: #993300;">C:\Users\Andrew&gt;cd \mysql\cluster
C:\mysql\cluster&gt;mysqld --defaults-file=my.4.cnf

C:\Users\Andrew&gt;cd \mysql\cluster
C:\mysql\cluster&gt;mysqld --defaults-file=my.5.cnf

C:\Users\Andrew&gt;cd \mysql\cluster
C:\mysql\cluster&gt;mysqld --defaults-file=my.6.</span>cnf</pre>
<p>Now, just check that all of the Cluster nodes are now up and running from the management client&#8230;</p>
<pre style="padding-left: 30px; font-size: 11px"><span style="color: #993300;">ndb_mgm&gt; show
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=2    @127.0.0.1  (mysql-5.1.34 ndb-7.0.6, Nodegroup: 0, Master)
id=3    @127.0.0.1  (mysql-5.1.34 ndb-7.0.6, Nodegroup: 0)</span></pre>
<pre style="padding-left: 30px; font-size: 11px"><span style="color: #993300;">[ndb_mgmd(MGM)] 1 node(s)
id=1    @127.0.0.1  (mysql-5.1.34 ndb-7.0.6)</span></pre>
<pre style="padding-left: 30px; font-size: 11px"><span style="color: #993300;">[mysqld(API)]   3 node(s)
id=4    @127.0.0.1  (mysql-5.1.34 ndb-7.0.6)
id=5    @127.0.0.1  (mysql-5.1.34 ndb-7.0.6)
id=6    @127.0.0.1  (mysql-5.1.34 ndb-7.0.6)</span></pre>
<h3>Using the Cluster</h3>
<p>There are now 3 API nodes/MySQL Servers/mgmds running; all accessing the same data. Each of those nodes can be accessed by the mysql client using the ports that were configured in the my.X.cnf files. For example, we can access the first of those nodes (node 4) in the following way from (yet another) window:</p>
<pre style="padding-left: 30px; font-size: 11px"><span style="color: #993300;">C:\Users\Andrew&gt;mysql -h localhost -P 3306
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.34-ndb-7.0.6-cluster-gpl MySQL Cluster Server (GPLType 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql&gt; use test;
Database changed
mysql&gt; create table assets (name varchar(30) not null primary key, value int) engine=ndb;
Query OK, 0 rows affected (1.44 sec
mysql&gt; insert into assets values ('car', 950);
Query OK, 1 row affected (0.00 sec
mysql&gt; select * from assets;
+------+-------+
| name | value |
+------+-------+
| car  |   950 |
+------+-------+
1 row in set (0.00 sec
mysql&gt; insert into assets2 values ('car', 950);
Query OK, 1 row affected (0.00 sec)</span></pre>
<p>To check that everything is working correctly, we can access the same database through another of the API nodes:</p>
<pre style="padding-left: 30px; font-size: 11px"><span style="color: #993300;">C:\Users\Andrew&gt;mysql -h localhost -P 3307
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.34-ndb-7.0.6-cluster-gpl MySQL Cluster Server (GPL)</span></pre>
<pre style="padding-left: 30px; font-size: 11px"><span style="color: #993300;">Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.</span></pre>
<pre style="padding-left: 30px; font-size: 11px"><span style="color: #993300;">mysql&gt; use test;
Database changed
mysql&gt; show tables;
+----------------+
| Tables_in_test |
+----------------+
| assets         |
+----------------+
1 row in set (0.06 sec)</span></pre>
<pre style="padding-left: 30px; font-size: 11px"><span style="color: #993300;">mysql&gt; select * from assets;
+------+-------+
| name | value |
+------+-------+
| car  |   950 |
+------+-------+
1 row in set (0.09 sec)</span></pre>
<p>It&#8217;s important to note that the table (and its contents) of any table created using the ndb storage engine can be accessed through any of the API nodes but those created using other storage engines are local to each of the API nodes (MySQL Servers).</p>
<h3>Your next steps</h3>
<p>This is a very simple, contrived set up &#8211; in any sensible deployment, the nodes would be spread accross multiple physical hosts in the interests of performance and redundancy. You&#8217;d also set several more variables in the configuration files in order to size and tune your Cluster. Finally, you&#8217;d likely want to have some of these processes running as daemons or services rather than firing up so many windows.</p>
<p>It&#8217;s important to note that Windows is not a fully supported platform for MySQL Cluster. If you have an interest in deploying a production system on Windows then please contact me at <a href="mailto:andrew@clusterdb.com">andrew@clusterdb.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterdb.com/mysql-cluster/my-first-cluster-running-on-windows/feed/</wfw:commentRss>
		<slash:comments>50</slash:comments>
		</item>
	</channel>
</rss>
