在Ubuntu上启动mysql集群管理节点(ndb_mgmd)时出错

我在初始启动 mysql-cluster管理节点时遇到了问题,并且非常感谢我能解决这个问题.请参阅我的两个失败示例,然后是我的config.ini文件.第一个示例显示了启动守护程序的基本命令及其产生的错误.第二次尝试跳过我认为在第一次引起错误的过程,但只导致一个不同的错误(我找不到解决方案).

~$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 

解决方法

您应该尝试使用sudo运行该命令:

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

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

您的问题似乎是权限,而不是配置.

相关文章

ubuntu退出redis的示例:指定配置文件方式启动源码redis:roo...
ubuntu中mysql改密码忘了的解决方法:1.在终端中切换到root权...
ubuntu安装mysql失败的解决方法原因:可能是原有的MySQL还有...
使用centos和ubuntu建站的区别有以下几点1.CentOS是Linux发行...
ubuntu图形界面和字符界面切换的方法:可以通过快捷键CTRL+A...
ubuntu中重启mysql失败的解决方法1.首先,在ubuntu命令行中,...