Where Can I Run MySQL Cluster?
The answer to the question posed in the title used to be, “Linux, Solaris, and Mac OS X - anywhere else, and you’re on your own, mate. And forget about running it on Windows.”
The answer is now more like, “If it’s one of the Unices, chances are that we support running Cluster on it. Windows still need not apply.”
In fact, it might be easier now just to list the platforms we definitely don’t support for using Cluster, which as far as I know are these:
- Minix
- Plan 9
- BeOS
- Windows
(To see what’s officially supported by MySQL for Cluster - and to what extent - check out this page that’s maintained by our illustrious Support Department: Supported Platforms for MySQL Cluster.)
However, if you can get a MySQL client running on one of these, then it can talk to a MySQL Server that’s running as an SQL node in a Cluster. For example, I can access one of my Linux machines from this one using the mysql client or from PHP running on this machine, as I did the other day, like so:
< ?php
// This is *not* especially good PHP code, it's just a quick &
// dirty test, and not intended for production, right?
$db1 = new mysqli('gigan', 'pizza', 'anchovies', 'ctest1');
$db2 = new mysqli('mothra', 'spagbol', 'tomatoes', 'ctest1');
$q = "CREATE TABLE fish (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(20)
) ENGINE=NDBCLUSTER";
if($db1->query($q) === TRUE)
{
echo "<p>Cluster table created on Gigan, displaying on Mothra:</p>n";
$q = "SHOW CREATE TABLE fish";
if($res = $db2->query($q))
{
$row = $res->fetch_array();
echo '<p>' . nl2br($row[1]) . "</p>n";
$q = "INSERT INTO fish
VALUES
('', 'trout'), ('', 'guppy'), ('', 'bass')";
if($db1->query($q) === TRUE)
{
echo "<p>Data inserted into table on Gigan.</p>n";
$q = "SELECT * FROM fish ORDER BY id";
if($res = $db2->query($q))
{
echo "<p>Retrieving data from Mothra:</p>n<ul>n";
while($row = $res->fetch_object())
{
echo "<li>Id: $row->id; Name: $row->name</li>n";
}
echo "</ul>n<p>Run completed.</p>";
$db1->close();
$db2->close();
}
}
}
}
?>
My ambition now is to be the first kid on my block to run his blog on a MySQL Cluster.
But I’ve got to do something about performance first - when two of your four data nodes are running on 433 MHz CPUs, it’s nothing to write home about.
In any case, you can run MySQL Cluster on lots of platforms now, and it is possible to run a client app on Windows that accesses a MySQL Cluster running on one of those.


