5.2.2. Configurations for the MySQL Server

The MySQL Server is used for connecting to the database and creating tables and do manual lookups. In order do configure the MySQL Server you have to create another configuration file called my.cnf which should be configured as described in this section. This file should be placed in the same directory as the config.ini file.

[MYSQLD] 
user=mysql 
port=3306 
socket=/tmp/mysql.sock.1 
datadir=/data/msql_1 
basedir=/usr/local/mysql 
ndbcluster 
ndb-connectstring=10.46.20.121 
default-storage-engine=ndbcluster
 
  • The user parameter states the Linux user that mysqld will run as. This user needs to be created before the installation is made.
  • The port parameter states the listening port for MySQL Server. 3306 is set by default.
  • The socket parameter can be used if you want to be able to connect using a file socket.
  • The datadir parameter states the path to the data directory for MySQL Server. One path should be added for each running MySQL Server.
  • The basedir parameter states the path to the software folder, i e the folder that was created when the purchased tar file for MySQL Cluster was extracted .
  • Including the ndbcluster parameter means that we will connect to a MySQL Cluster.
  • The ndb-connectstring should state the IP address (and port as well if another port than 1186 is being used) to the MySQL Cluster management node.