From: Luke H. Crouch Date: July 26 2004 4:13pm Subject: RE: mysqld API overview? List-Archive: http://lists.mysql.com/cluster/196 Message-Id: <075C170BC7219F439DD3FE8C880648C1C3A525@red-ivy.red-man.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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? -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? >=20 >=20 > (1) my-medium.cnf is distributed with the source > Look under /usr/local/mysql/share/mysql >=20 > (2) I placed the Ndb.cfg and my.cnf in the datadir for mysqld > /usr/local/mysql/var >=20 > (3) I created a user to run mysql: > user =3D mysql > group =3D mysql >=20 > (4) I set the ownership of the files under the install tree=20 > as follows: >=20 > [applied in theorder shown] > * chown -R root /usr/local/mysql > * chgrp -R mysql /usr/local/mysql > * chown -R mysql /usr/local/mysql/var >=20 > (5) Before I start mysqld_safe I set the environment using=20 > the following > script: >=20 > #!/bin/bash > =20 > MYSQL_HOME=3D/usr/local/mysql > export PATH=3D$MYSQL_HOME/bin:$MYSQL_HOME/libexec:$PATH > export LD_LIBRARY_PATH=3D$MYSQL_HOME/lib > export MANPATH=3D$NDB_HOME/man:$MANPATH >=20 > (6) Then I check that the ennvironment is correct: >=20 > % which mysqld_safe > =09 > /usr/local/mysql/bin/mysqld_safe >=20 > -Joseph >=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D >=20 > On Mon, 2004-07-26 at 11:22, Crouch, Luke H. wrote: > > where is the my-medium.cnf file located? I copied my own=20 > my.cnf file to the var directory and still don't see the API=20 > node listed when I run status... > >=20 > > also, where do you have that Ndb.cfg file? in the datadir=20 > for mysql, or somewhere else? > >=20 > > thanks again, > > -L > >=20 > > > -----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? > > >=20 > > >=20 > > > If you have more than one version of the mysqld on your=20 > > > system it might > > > be better for now not to use a global my.cnf file, /etc/my.cnf. =20 > > >=20 > > > Following the instructions in the tutorial on the MySQL WEBsite, I > > > copied the contents of my-medium.cnf into=20 > /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. > > >=20 > > >=20 > > > -Joseph > > > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > > >=20 > > >=20 > > > 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=20 > > > directory. I've been using a little different syntax in the=20 > > > Ndb.cfg files, and it's been working fine so far... > > > >=20 > > > > OwnProcessId 9 > > > > 10.0.199.150 10000 > > > >=20 > > > > would it make a difference if I'm running mysqld_safe or=20 > > > mysqld? what about the ndbcluster option? can it just stay in=20 > > > the my.cnf, or does it have to be on the mysqld command? > > > >=20 > > > > thanks for response...I'll try out that different syntax=20 > > > for Ndb.cfg... > > > >=20 > > > > -L > > > >=20 > > > > > -----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? > > > > >=20 > > > > >=20 > > > > > Luke, > > > > >=20 > > > > > (0) The mysqld needs it's own Ndb.cfg. > > > > >=20 > > > > > For example: > > > > >=20 > > > > > % cat /usr/local/mysql/var/Ndb.cfg > > > > > nodeid=3D9 > > > > > host=3D10.0.199.150:10000 > > > > >=20 > > > > > The Ndb.cfg file contains information needed by the=20 > > > mysqld to join the > > > > > cluster managed by the manager node on 10.0.199.150 > > > > >=20 > > > > > (1) The mysqld must be running in order for the=20 > > > management node to see > > > > > it. > > > > >=20 > > > > > -Joseph > > > > >=20 > > > > >=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > > > > > On Mon, 2004-07-26 at 09:37, Crouch, Luke H. wrote: > > > > > > is there a guide explaining how to set up mysqld processes=20 > > > > > as API to the cluster? I'm running a 4-machine cluster=20 > > > > > (1,2,3, and 4 are the creative names, eh?). in config.ini,=20 > > > > > I've specified: > > > > > > =20 > > > > > > 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 > > > > > > =20 > > > > > > on machine 1.... > > > > > > /NDB/mgm/config.ini contents: > > > > > > > > > > > > [API DEFAULT] > > > > > > ArbitratorRank: 1 > > > > > > =20 > > > > > > [API] > > > > > > Id: 6 > > > > > > ExecuteOnComputer: 1 > > > > > > =20 > > > > > > [API] > > > > > > Id: 7 > > > > > > ExecuteOnComputer: 2 > > > > > > =20 > > > > > > [API] > > > > > > Id: 8 > > > > > > ExecuteOnComputer: 3 > > > > > > =20 > > > > > > [API] > > > > > > Id:9 > > > > > > ExecuteOnComputer: 4 > > > > > > =20 > > > > > > /etc/my.cnf contents: > > > > > > [mysqld] > > > > > > datadir=3D/usr/local/mysql/var > > > > > > ndbcluster > > > > > > socket=3D/tmp/mysql.sock > > > > > > =20 > > > > > > [client] > > > > > > socket=3D/tmp/mysql.sock > > > > > > =20 > > > > > > /usr/local/mysql/var/Ndb.cfg contents: > > > > > > OwnProcessId 6 > > > > > > 10.0.199.150 10000 #mgmt server IP > > > > > > =20 > > > > > > but when I run an 'ALL STATUS' in the management, I don't=20 > > > > > see any API nodes listed at all. is it like the DB nodes,=20 > > > > > where you have to start them all up to get one of them to=20 > > > > > start? or have I put my Ndb.cfg in the wrong place? do I have=20 > > > > > to explicitly use the --ndbcluster option on mysqld, or can I=20 > > > > > use it in the my.cnf like I am? the API setup part of the=20 > > > > > cluster admin guide is very shaky...a couple sentences long... > > > > > > =20 > > > > > > can anyone help me out? > > > > > > thanks, > > > > > > -L > > > > > --=20 > > > > > Joseph E. Sacco, Ph.D. > > > > >=20 > > > > >=20 > > > --=20 > > > Joseph E. Sacco, Ph.D. > > >=20 > > >=20 > --=20 > Joseph E. Sacco, Ph.D. >=20 >=20