This generates a random password for the MySQL root  account. If you do not  want the random password to be generated, you can substitute the --initialize-insecure  option for -- initialize . In either case, you should review Section 2.10.1, “Initializing the Data Directory” , for additional information before performing this step. See also Section 4.4.2, “mysql_secure_installation — Improve MySQL Installation Security” . 

4. Set the necessary permissions for the MySQL server and data directories: 

shell> chown -R root . shell> chown -R mysql data shell> chgrp -R mysql . 

5. Copy the MySQL startup script to the appropriate directory, make it executable, and set it to start when the operating system is booted up: 

shell> cp support-files/mysql.server /etc/rc.d/init.d/ shell> chmod +x /etc/rc.d/init.d/mysql.server shell> chkconfig --add mysql.server 

(The startup scripts directory may vary depending on your operating system and version—for example, in some Linux distributions, it is /etc/init.d .) 

Here we use Red Hat’s chkconfig  for creating links to the startup scripts; use whatever means is appropriate for this purpose on your platform, such as update-rc.d  on Debian. 

Remember that the preceding steps must be repeated on each machine where an SQL node is to reside. 

Data nodes.  Installation of the data nodes does not require the mysqld  binary. Only the NDB Cluster data node executable ndbd  (single-threaded) or ndbmtd  (multithreaded) is required. These binaries can also be found in the .tar.gz  archive. Again, we assume that you have placed this archive in /var/tmp . 

As system root  (that is, after using sudo , su root , or your system’s equivalent for temporarily assuming the system administrator account’s privileges), perform the following steps to install the data node binaries on the data node hosts: 

1. Change location to the /var/tmp  directory, and extract the ndbd  and ndbmtd  binaries from the archive into a suitable directory such as /usr/local/bin : 

shell> cd /var/tmp shell> tar -zxvf mysql-cluster-gpl-8.0.25-linux-glibc2.12-x86_64.tar.gz shell> cd mysql-cluster-gpl-8.0.25-linux-glibc2.12-x86_64 shell> cp bin/ndbd /usr/local/bin/ndbd shell> cp bin/ndbmtd /usr/local/bin/ndbmtd 

(You can safely delete the directory created by unpacking the downloaded archive, and the files it contains, from /var/tmp  once ndb_mgm  and ndb_mgmd  have been copied to the executables directory.) 

2. Change location to the directory into which you copied the files, and then make both of them executable: 

shell> cd /usr/local/bin shell> chmod +x ndb* 

The preceding steps should be repeated on each data node host. 

Although only one of the data node executables is required to run an NDB Cluster data node, we have shown you how to install both ndbd  and ndbmtd  in the preceding instructions. We recommend that you do 

