Bug #70746 Unable to Start [mysqld(API)] 1 node(s)
Submitted: 28 Oct 2013 6:33 Modified: 22 Nov 2013 18:38
Reporter: aseem vinkle Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Cluster: NDB API Severity:S5 (Performance)
Version:mysql-cluster-gpl-7.2.13-solaris10-x86_6 OS:Solaris (SunOS PBCCTNSDCAV01 5.10 Generic_147148-26 i86pc i386 i86pc)
Assigned to: CPU Architecture:Any

[28 Oct 2013 6:33] aseem vinkle
Description:
I am going to install Mysql clustering on Single node 

Using below mentioned steps 

1. install
Locate the tar ball that you’ve downloaded,
extract it and then create a link to it:
[~]$ gunzip Desktop/Downloads/msql-cluster-gpl-7.1.3-solaris10-i386.tar.gz
[~]$ tar xvf Desktop/Downloads/msql-cluster-gpl-7.1.3-solaris10-i386.tar
[~]$ ln –s msql-cluster-gpl-7.1.3-solaris10-i386 mysqlc
Optionally, you could add
~/mysqlc/bin
to your path to avoid needing the full path when running the processes. 

2.  onfigure
For a first Cluster, start wi
th a single MySQL Server (
mysqld
), a pair of Data Nodes (
ndbd
) and a single management node (
ndb_mgmd
)
– all running on the same server.
Create folders to store the config
uration files and the data files:
[~]$ mkdir my_cluster my_cluster/ndb_data my_cluster/mysqld_data my_cluster/conf
In the
conf
folder, create 2 files:
my.cnf
:
[mysqld]
ndbcluster
datadir=/home/user1/my_cluster/mysqld_data
basedir=/home/user1/mysqlc
port=5000
Copyright © 2010, 2011 Oracle and/or its affi
liates. All rights reserved.
Page 2 of 3
config.ini
:
[ndb_mgmd]
hostname=localhost
datadir=/home/user1/my_cluster/ndb_data
NodeId=1
[ndbd default]
noofreplicas=2
datadir=/home/user1/my_cluster/ndb_data
[ndbd]
hostname=localhost
NodeId=3
[ndbd]
hostname=localhost
NodeId=4
[mysqld]
NodeId=50
Note that in a production system there are other para
meters that you would set to tune the configuration.
Just like any other MySQL Server, the
mysqld
process requires a ‘mysql’ database to be
created and populated with essential system
data:
[~]$ cd mysqlc
[~/mysqlc]$ scripts/mysql_install_db --no-defaults --datadir=/home/user1/my_cluster/mysqld_data/ 

3. run
The processes should be started in the order of
management node, data nodes & then MySQL Server:
[~/mysqlc]$ cd ../my_cluster
[~/my_cluster]$ $HOME/mysqlc/bin/ndb_mgmd -f conf/config.ini --initial –configdir=$HOME/my_cluster/conf/
[~/my_cluster]$ $HOME/mysqlc/bin/ndbd -c localhost:1186
[~/my_cluster]$ $HOME/mysqlc/bin/ndbd -c localhost:1186
Check the status of the Cluster and wait for the Data N
odes to finish starting before starting the MySQL Server:
[~/my_cluster]$ $HOME/mysqlc/bin/ndb_mgm -e show 
----------------------------------------------------------------------

ndb_mgm> show
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=3    @127.0.0.1  (mysql-5.5.31 ndb-7.2.13, Nodegroup: 0, Master)
id=4    @127.0.0.1  (mysql-5.5.31 ndb-7.2.13, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @127.0.0.1  (mysql-5.5.31 ndb-7.2.13)

[mysqld(API)]   1 node(s)
id=50 (not connected, accepting connect from any host)

----------------------------------------------------------------------------
bash-3.2# bin/mysqld --defaults-file=conf/my.conf&
[1] 4399
bash-3.2# Could not open required defaults file: /export/home/mysql-cluster-gpl-7.2.13-solaris10-x86_64/conf/my.conf
Fatal error in defaults handling. Program aborted

[1]+  Exit 1                  bin/mysqld --defaults-file=conf/my.conf
-------------------------------------------------------------------------------

ash-3.2# bin/mysqld --defaults-file=/export/home/my_cluster/conf/my.cnf &
[1] 4339
bash-3.2# 131028 11:18:28 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

131028 11:18:28 [ERROR] Aborting

131028 11:18:28 [Note] bin/mysqld: Shutdown complete

Pls suggest 

How to repeat:
I am going to install Mysql clustering on Single node 

Using below mentioned steps 

1. install
Locate the tar ball that you’ve downloaded,
extract it and then create a link to it:
[~]$ gunzip Desktop/Downloads/msql-cluster-gpl-7.1.3-solaris10-i386.tar.gz
[~]$ tar xvf Desktop/Downloads/msql-cluster-gpl-7.1.3-solaris10-i386.tar
[~]$ ln –s msql-cluster-gpl-7.1.3-solaris10-i386 mysqlc
Optionally, you could add
~/mysqlc/bin
to your path to avoid needing the full path when running the processes. 

2.  onfigure
For a first Cluster, start wi
th a single MySQL Server (
mysqld
), a pair of Data Nodes (
ndbd
) and a single management node (
ndb_mgmd
)
– all running on the same server.
Create folders to store the config
uration files and the data files:
[~]$ mkdir my_cluster my_cluster/ndb_data my_cluster/mysqld_data my_cluster/conf
In the
conf
folder, create 2 files:
my.cnf
:
[mysqld]
ndbcluster
datadir=/home/user1/my_cluster/mysqld_data
basedir=/home/user1/mysqlc
port=5000
Copyright © 2010, 2011 Oracle and/or its affi
liates. All rights reserved.
Page 2 of 3
config.ini
:
[ndb_mgmd]
hostname=localhost
datadir=/home/user1/my_cluster/ndb_data
NodeId=1
[ndbd default]
noofreplicas=2
datadir=/home/user1/my_cluster/ndb_data
[ndbd]
hostname=localhost
NodeId=3
[ndbd]
hostname=localhost
NodeId=4
[mysqld]
NodeId=50
Note that in a production system there are other para
meters that you would set to tune the configuration.
Just like any other MySQL Server, the
mysqld
process requires a ‘mysql’ database to be
created and populated with essential system
data:
[~]$ cd mysqlc
[~/mysqlc]$ scripts/mysql_install_db --no-defaults --datadir=/home/user1/my_cluster/mysqld_data/ 

3. run
The processes should be started in the order of
management node, data nodes & then MySQL Server:
[~/mysqlc]$ cd ../my_cluster
[~/my_cluster]$ $HOME/mysqlc/bin/ndb_mgmd -f conf/config.ini --initial –configdir=$HOME/my_cluster/conf/
[~/my_cluster]$ $HOME/mysqlc/bin/ndbd -c localhost:1186
[~/my_cluster]$ $HOME/mysqlc/bin/ndbd -c localhost:1186
Check the status of the Cluster and wait for the Data N
odes to finish starting before starting the MySQL Server:
[~/my_cluster]$ $HOME/mysqlc/bin/ndb_mgm -e show 
----------------------------------------------------------------------

ndb_mgm> show
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=3    @127.0.0.1  (mysql-5.5.31 ndb-7.2.13, Nodegroup: 0, Master)
id=4    @127.0.0.1  (mysql-5.5.31 ndb-7.2.13, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @127.0.0.1  (mysql-5.5.31 ndb-7.2.13)

[mysqld(API)]   1 node(s)
id=50 (not connected, accepting connect from any host)

----------------------------------------------------------------------------
bash-3.2# bin/mysqld --defaults-file=conf/my.conf&
[1] 4399
bash-3.2# Could not open required defaults file: /export/home/mysql-cluster-gpl-7.2.13-solaris10-x86_64/conf/my.conf
Fatal error in defaults handling. Program aborted

[1]+  Exit 1                  bin/mysqld --defaults-file=conf/my.conf
-------------------------------------------------------------------------------

ash-3.2# bin/mysqld --defaults-file=/export/home/my_cluster/conf/my.cnf &
[1] 4339
bash-3.2# 131028 11:18:28 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

131028 11:18:28 [ERROR] Aborting

131028 11:18:28 [Note] bin/mysqld: Shutdown complete

Pls suggest 

Suggested fix:
no idea
[29 Oct 2013 4:25] aseem vinkle
Plss suggest the solution
[29 Oct 2013 4:26] aseem vinkle
Pls send Any document for known error inclustering
[12 Nov 2013 11:34] Hartmut Holzgraefe
not a bug, as the error message you quoted already said:

  Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

mysqld is not supposed to be run by the operating systems root account, it should either be configured to use a different, less privileged, user as e.g. "mysql", or if you really want to run the mysqld process with root privileges you need to explicitly add --user="root" to the command line (or user=root to the [mysqld] section of your my.cnf)

Would be nice if the error message would point to a more specific page (best with a URL included) instead of just the general "Security" section which has become quite large by now ...
[22 Nov 2013 18:38] MySQL Verification Team
Hello Aseem,

Thank you for your report.
I agree with Hartmut, this is not a bug. Please reference - http://dev.mysql.com/doc/refman/5.5/en/security-against-attack.html

Thanks,
Umesh