List:Cluster« Previous MessageNext Message »
From:Luke H. Crouch Date:July 27 2004 1:13pm
Subject:RE: mysqld API overview?
View as plain text  
wow, this turned out to be part of it. I assumed they weren't running when I ran 'ALL
STATUS', but when I run 'SHOW', it shows all the nodes running fine...

NDB> SHOW
Cluster Configuration
---------------------
4 NDB Node(s)
DB node:        2  (Version: 3.5.0)
DB node:        3  (Version: 3.5.0)
DB node:        4  (Version: 3.5.0)
DB node:        5  (Version: 3.5.0)

4 API Node(s)
API node:       6  (Version: 3.5.0)
API node:       7  (Version: 3.5.0)
API node:       8  (Version: 3.5.0)
API node:       9  (Version: 3.5.0)

1 MGM Node(s)
MGM node:       1  (Version: 3.5.0)

now I'll start working on getting tables set up and accessible from all the API's. thanks
for all the suggestions, everyone!

-L

> -----Original Message-----
> From: Magnus Svensson [mailto:magnus.svensson@stripped]
> Sent: Tuesday, July 27, 2004 3:30 AM
> To: Crouch, Luke H.
> Cc: jsacco@stripped; cluster@stripped
> Subject: RE: mysqld API overview?
> 
> 
> On Mon, 2004-07-26 at 18:13, Crouch, Luke H. wrote:
> > okay, I did the same thing...
> > 
> > copied my-medium.cnf to /usr/local/mysql/var/my.cnf
> > put Ndb.cfg in /usr/local/mysql/var
> > 
> > create the environment variables as specified.
> > 
> > ran mysqld as user mysql
> > 
> > and when I do an ALL STATUS, I still don't have any API 
> nodes listed at all. I noticed that the my-medium.cnf file 
> did NOT have an ndbcluster line anywhere...did you add this?
> 
> Hi,
> 
> ALL STATUS will only print status of DB nodes. Like this:
> NDB> all status
> Node 2: Started (Version 3.5.0)
> 
> Node 3: Started (Version 3.5.0)
> 
> 
> Try the SHOW command instead and it will print something like this:
> -- NDB Cluster -- Management Client --
> Connecting to Management Server: 127.0.0.1:2200
> NDB> show
> Cluster Configuration
> ---------------------
> 2 NDB Node(s)
> DB node:        2  (Version: 3.5.0)
> DB node:        3  (Version: 3.5.0)
> 
> 5 API Node(s)
> API node:       4  (not connected) 
> API node:       5  (not connected) 
> API node:       6  (not connected) 
> API node:       7  (not connected) 
> API node:       8  (not connected) 
> 
> 1 MGM Node(s)
> MGM node:       1  (Version: 3.5.0)
> 
> 
> 
> Notice that there is a difference if you type the commands in the MGM 
> Server(ndb_mgmd) window or if you use the Management Client(ndb_mgm).
> I have used the Management Client in the examples above.
> 
> 
> > 
> > -L
> > 
> > > -----Original Message-----
> > > From: Joseph E. Sacco, Ph.D. [mailto:jsacco@stripped]
> > > Sent: Monday, July 26, 2004 11:00 AM
> > > To: Crouch, Luke H.
> > > Cc: cluster@stripped
> > > Subject: RE: mysqld API overview?
> > > 
> > > 
> > > (1) my-medium.cnf is distributed with the source
> > > Look under /usr/local/mysql/share/mysql
> > > 
> > > (2) I placed the Ndb.cfg and my.cnf in the datadir for mysqld
> > > 	/usr/local/mysql/var
> > > 
> > > (3) I created a user to run mysql:
> > > 	user = mysql
> > > 	group = mysql
> > > 
> > > (4) I set the ownership of the files under the install tree 
> > > as follows:
> > > 
> > > [applied in theorder shown]
> > >         * chown -R root /usr/local/mysql
> > >         * chgrp -R mysql /usr/local/mysql
> > >         * chown -R mysql /usr/local/mysql/var
> > > 
> > > (5) Before I start mysqld_safe I set the environment using 
> > > the following
> > > script:
> > > 
> > >         #!/bin/bash
> > >                                                               
> > >                                        MYSQL_HOME=/usr/local/mysql
> > >         export PATH=$MYSQL_HOME/bin:$MYSQL_HOME/libexec:$PATH
> > >         export LD_LIBRARY_PATH=$MYSQL_HOME/lib
> > >         export MANPATH=$NDB_HOME/man:$MANPATH
> > > 
> > > (6) Then I check that the ennvironment is correct:
> > > 
> > > 	% which mysqld_safe
> > > 	
> > > 	  /usr/local/mysql/bin/mysqld_safe
> > > 
> > > -Joseph
> > > 
> > > =========================================================
> > > 
> > > On Mon, 2004-07-26 at 11:22, Crouch, Luke H. wrote:
> > > > where is the my-medium.cnf file located? I copied my own 
> > > my.cnf file to the var directory and still don't see the API 
> > > node listed when I run status...
> > > > 
> > > > also, where do you have that Ndb.cfg file? in the datadir 
> > > for mysql, or somewhere else?
> > > > 
> > > > thanks again,
> > > > -L
> > > > 
> > > > > -----Original Message-----
> > > > > From: Joseph E. Sacco, Ph.D. [mailto:jsacco@stripped]
> > > > > Sent: Monday, July 26, 2004 9:15 AM
> > > > > To: Crouch, Luke H.
> > > > > Cc: cluster@stripped
> > > > > Subject: RE: mysqld API overview?
> > > > > 
> > > > > 
> > > > > If you have more than one version of the mysqld on your 
> > > > > system it might
> > > > > be better for now not to use a global my.cnf file, 
> /etc/my.cnf.  
> > > > > 
> > > > > Following the instructions in the tutorial on the 
> MySQL WEBsite, I
> > > > > copied the contents of my-medium.cnf into 
> > > /usr/local/mysql/var/my.cnf,
> > > > > changed the port number [just in case...], and fired up
> > > > > /usr/local/mysql/bin/mysqld_safe. Seems to work.
> > > > > 
> > > > > 
> > > > > -Joseph
> > > > > ===========================================================
> > > > > 
> > > > > 
> > > > > On Mon, 2004-07-26 at 10:02, Crouch, Luke H. wrote:
> > > > > > I do have an Ndb.cfg file in the /usr/local/mysql/var 
> > > > > directory. I've been using a little different syntax in the 
> > > > > Ndb.cfg files, and it's been working fine so far...
> > > > > > 
> > > > > > OwnProcessId 9
> > > > > > 10.0.199.150 10000
> > > > > > 
> > > > > > would it make a difference if I'm running mysqld_safe or 
> > > > > mysqld? what about the ndbcluster option? can it just stay in 
> > > > > the my.cnf, or does it have to be on the mysqld command?
> > > > > > 
> > > > > > thanks for response...I'll try out that different syntax 
> > > > > for Ndb.cfg...
> > > > > > 
> > > > > > -L
> > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Joseph E. Sacco, Ph.D.
> [mailto:jsacco@stripped]
> > > > > > > Sent: Monday, July 26, 2004 9:00 AM
> > > > > > > To: Crouch, Luke H.
> > > > > > > Cc: cluster@stripped
> > > > > > > Subject: Re: mysqld API overview?
> > > > > > > 
> > > > > > > 
> > > > > > > Luke,
> > > > > > > 
> > > > > > > (0) The mysqld needs it's own Ndb.cfg.
> > > > > > > 
> > > > > > > For example:
> > > > > > > 
> > > > > > > 	% cat /usr/local/mysql/var/Ndb.cfg
> > > > > > > 	nodeid=9
> > > > > > > 	host=10.0.199.150:10000
> > > > > > > 
> > > > > > > The Ndb.cfg file contains information needed by the 
> > > > > mysqld to join the
> > > > > > > cluster managed by the manager node on 10.0.199.150
> > > > > > > 
> > > > > > > (1) The mysqld must be running in order for the 
> > > > > management node to see
> > > > > > > it.
> > > > > > > 
> > > > > > > -Joseph
> > > > > > > 
> > > > > > > 
> > > =============================================================  
> > > > > > > On Mon, 2004-07-26 at 09:37, Crouch, Luke H. wrote:
> > > > > > > > is there a guide explaining how to set up 
> mysqld processes 
> > > > > > > as API to the cluster? I'm running a 4-machine cluster
> 
> > > > > > > (1,2,3, and 4 are the creative names, eh?). in 
> config.ini, 
> > > > > > > I've specified:
> > > > > > > >  
> > > > > > > > machine 1: 1 MGM, 1 DB, 1 API
> > > > > > > > machine 2: 1 DB, 1 API
> > > > > > > > machine 3: 1 DB, 1 API
> > > > > > > > machine 4: 1 DB, 1 API
> > > > > > > >  
> > > > > > > > on machine 1....
> > > > > > > > /NDB/mgm/config.ini contents:
> > > > > > > > <snip>
> > > > > > > > [API DEFAULT]
> > > > > > > > ArbitratorRank: 1
> > > > > > > >  
> > > > > > > > [API]
> > > > > > > > Id: 6
> > > > > > > > ExecuteOnComputer: 1
> > > > > > > >  
> > > > > > > > [API]
> > > > > > > > Id: 7
> > > > > > > > ExecuteOnComputer: 2
> > > > > > > >  
> > > > > > > > [API]
> > > > > > > > Id: 8
> > > > > > > > ExecuteOnComputer: 3
> > > > > > > >  
> > > > > > > > [API]
> > > > > > > > Id:9
> > > > > > > > ExecuteOnComputer: 4
> > > > > > > >  
> > > > > > > > /etc/my.cnf contents:
> > > > > > > > [mysqld]
> > > > > > > > datadir=/usr/local/mysql/var
> > > > > > > > ndbcluster
> > > > > > > > socket=/tmp/mysql.sock
> > > > > > > >  
> > > > > > > > [client]
> > > > > > > > socket=/tmp/mysql.sock
> > > > > > > >  
> > > > > > > > /usr/local/mysql/var/Ndb.cfg contents:
> > > > > > > > OwnProcessId 6
> > > > > > > > 10.0.199.150 10000 #mgmt server IP
> > > > > > > >  
> > > > > > > > but when I run an 'ALL STATUS' in the 
> management, I don't 
> > > > > > > see any API nodes listed at all. is it like the DB
> nodes, 
> > > > > > > where you have to start them all up to get one of them
> to 
> > > > > > > start? or have I put my Ndb.cfg in the wrong 
> place? do I have 
> > > > > > > to explicitly use the --ndbcluster option on 
> mysqld, or can I 
> > > > > > > use it in the my.cnf like I am? the API setup part of
> the 
> > > > > > > cluster admin guide is very shaky...a couple 
> sentences long...
> > > > > > > >  
> > > > > > > > can anyone help me out?
> > > > > > > > thanks,
> > > > > > > > -L
> > > > > > > -- 
> > > > > > > Joseph E. Sacco, Ph.D.
> <jsacco[at]earthlink[dot]net>
> > > > > > > 
> > > > > > > 
> > > > > -- 
> > > > > Joseph E. Sacco, Ph.D. <jsacco[at]earthlink[dot]net>
> > > > > 
> > > > > 
> > > -- 
> > > Joseph E. Sacco, Ph.D. <jsacco[at]earthlink[dot]net>
> > > 
> > > 
> -- 
> Magnus Svensson, Software Engineer
> MySQL AB, www.mysql.com
> Office: +46 709 164 491
> 
> 
Thread
mysqld API overview?Luke H. Crouch26 Jul
  • Re: mysqld API overview?Ph.D. Joseph E. Sacco26 Jul
RE: mysqld API overview?Luke H. Crouch26 Jul
  • RE: mysqld API overview?Ph.D. Joseph E. Sacco26 Jul
RE: mysqld API overview?Luke H. Crouch26 Jul
  • RE: mysqld API overview?Ph.D. Joseph E. Sacco26 Jul
RE: mysqld API overview?Luke H. Crouch26 Jul
  • RE: mysqld API overview?Magnus Svensson27 Jul
RE: mysqld API overview?Luke H. Crouch26 Jul
  • RE: mysqld API overview?Magnus Svensson27 Jul
RE: mysqld API overview?Luke H. Crouch27 Jul