This is mod_ndb, an Apache module that provides a REST Web Services API for
MySQL Cluster.


--- BUILDING THE MODULE ---

MySQL Cluster and Apache must be installed, including all header files and 
shared libraries.

# ./configure --mysql=/path/to/mysql_config --apxs=/path/to/apxs
# make
# make install

Note that this configure script is not GNU Autoconf (which is not required, 
since it has already been run to build MySQL), but rather a small script which
can use the "mysql_config" and "apxs" commands to generate an appropriate 
Makefile for mod_ndb.

--- Building for Apache 2 ---

Due to a known bug in Apache 2 (http://issues.apache.org/bugzilla/show_bug.cgi?id=29771), 
in order to build mod_ndb, you must also have Apache 1.3 installed.  Run 
configure with --apxs=/apache2/bin/apxs and --apxs1=/apache13/bin/apxs


--- STARTING THE SERVER ---

1) You will need a few available [API] node ids in your MySQL Cluster 
configuration (one for each httpd process).  If these do not exist, edit
the cluster configuration file and restart your management server.

2) Read over and edit the file "test.conf".  At a minimum, set 
ndb-connectstring to point to your cluster management server  

3) Type "make start" to start a test httpd server that includes mod_ndb.
   "make stop" will stop the server. 
   Note the server error log file --  logs/ndb_error_log  

4) Apache must be able to load several NDB and MySQL libraries from 
the mysql lib directory (e.g. /usr/local/lib/mysql); if the server will not
start up due to a failure here, you may need to set LD_LIBRARY_PATH.

5) If the server starts and attempts to initialize mod_ndb, there will be 
one or more notices in the Apache server log file, such as 

[notice] Cannot connect to NDB Cluster

-- indicating failure, or a succesful notice like:

[notice] Process 457 connected to NDB Cluster as node 5



--- USING THE TEST SUITE ---

cd Tests

# Run the SQL queries to create the test database
./run-test -s

# Run all tests
./run-test -t 

# Run a single test 
./run-test typ101


--- BUILD NOTES FOR VARIOUS PLATFORMS ---

If you have a thread-safe mysql client library, configure mod_ndb with --thread-safe 

On 64-bit linux you may need to build MySQL with
  CFLAGS=-fPIC ./configure --with-ndbcluster --with-pic=yes
to avoid a linker error 


--- FURTHER DOCUMENTATION ---

More documentation is available at: 
   http://forge.mysql.com/wiki/ProjectPage_mod_ndb


Enjoy!

JD
jdd@mysql.com
