Error starting mysql cluster management node (ndb_mgmd) on Ubuntu

10,402

You should try running that commands with sudo:

~$ sudo ndb_mgmd -f /var/lib/mysql-cluster/config.ini

~$ sudo ndb_mgmd --skip-config-cache -f /var/lib/mysql-cluster/config.ini

Your problem seems to be with permissions, not configuration.

Share:
10,402

Related videos on Youtube

sswahn
Author by

sswahn

Updated on September 15, 2022

Comments

  • sswahn
    sswahn over 1 year

    I am having trouble with the initial start up of the mysql-cluster management node and would appreciate any help I can get about this issue. See my two examples of failure below followed by my config.ini file. The first example shows the basic command to start the daemon and the error it produces. The second attempts to skip the process I believe caused the error in the first, but only results in a different error (one that I can find no solution to).


    ~$ ndb_mgmd -f /var/lib/mysql-cluster/config.ini
    MySQL Cluster Management Server mysql - 5.5.25 ndb-7.2.7 2012-07-27 16:44:51 [MgmtSrvr] INFO -- The default config directory '/user/local /mysql/mysql-cluster' does not exist. Trying to create it... Failed to create directory '/usr/local/mysql/mysql-cluster', error: 2 2012-07-27 16:44:51 [MgmtSrvr] ERROR -- Could not create directory '/usr/local/mysql/mysql-cluster'. Either create it manually or specify a different directory with --configdir=
    ~$ ndb_mgmd --skip-config-cache -f /var/lib/mysql-cluster/config.ini
    MySQL Cluster Management Server mysql - 5.5.25 ndb-7.2.7 2012-07-27 16:44:51 [MgmtSrvr] INFO -- Skipping check of config directory since config cache is disabled. Failed to parse parameters for log handler: 'FILE:filename=/var/lib/mysql-cluster/ndb_1_cluster.log,maxsize=1000000, maxfiles=6', error:13 '(null)'


    /var/lib/mysql-cluster/config.ini:

    
        [ndbd default]
        # Options affecting ndbd processes on all data nodes:
        NoOfReplicas=2    # Number of replicas
        DataMemory=80M    # How much memory to allocate for data storage
        IndexMemory=18M   # How much memory to allocate for index storage
    
    
        [tcp default]
        # TCP/IP options:
    
        [ndb_mgmd]
        # Management process options:
        hostname=192.168.0.3          # Hostname or IP address of MGM node
        datadir=/var/lib/mysql-cluster  # Directory for MGM node log files
        NodeId=1
    
        [ndbd]
        # Options for data node-1:
                                        # (one [ndbd] section per data node)
        hostname=192.168.0.1            # Hostname or IP address
        datadir=/usr/local/mysql/data   # Directory for this data node's data files
        NodeId=2
    
        [ndbd]
        # Options for data node-2:
        hostname=192.168.0.2            # Hostname or IP address
        datadir=/usr/local/mysql/data   # Directory for this data node's data files
        NodeId=3
    
        [mysqld]
        # SQL node options:
        hostname=192.168.0.4            # Hostname 
    
    
  • plasmid87
    plasmid87 about 11 years
    If you're using the RPM releases there is a mysql user installed, which you can run the various daemons with (e.g., /usr/sbin/ndb_mgmd and /usr/sbin/ndbd). Just make sure the directories are set properly and owned by mysql.