- 论坛徽章:
- 0
|
各位大哥郁闷死了
我在配置mysql集群,配置完成启动没有问题
使用ndb_mgm -e 查看
[root@new-host ~]# ndb_mgm -e show
Connected to Management Server at: 192.168.0.38:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=3 @192.168.0.38 (Version: 5.2.3, Nodegroup: 0, Master)
id=4 @192.168.0.39 (Version: 5.2.3, Nodegroup: 0)
[ndb_mgmd(MGM)] 2 node(s)
id=1 @192.168.0.38 (Version: 5.2.3)
id=2 @192.168.0.39 (Version: 5.2.3)
[mysqld(API)] 2 node(s)
id=5 @192.168.0.38 (Version: 5.2.3)
id=6 @192.168.0.39 (Version: 5.2.3)
两台都能启动
进入mysql的时候出现的错误ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
我在网上查过很多资料,全不能解决我的问题
而且机器上的/var/lib目录中没有mysql的文件夹也就没有mysql.sock的文件,
我自己建立了一个mysql的目录在/var/lib中有手动建立一个mysql.sock的文件,建立了一个连接ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
在进入mysql的时候提示ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)
两台机器的进程
1、
root 2556 0.0 0.4 2552 1048 ? SN 14:33 0:00 /usr/libexec/gam_server
root 2559 0.0 0.5 4776 1460 tty1 Ss 14:36 0:00 -bash
root 2598 0.1 1.0 9844 2796 ? Ss 14:39 0:00 sshd: root@pts/0
root 2600 0.0 0.5 5072 1528 pts/0 Ss 14:39 0:00 -bash
root 2631 0.1 0.6 7084 1656 ? Ssl 14:39 0:00 ndb_mgmd --ndb-nodeid=2
root 2642 0.0 0.7 8428 1892 ? Ss 14:39 0:00 ndbd --ndb-nodeid=4
root 2643 1.2 38.2 298996 97788 ? Sl 14:39 0:07 ndbd --ndb-nodeid=4
root 2677 0.0 0.4 4484 1096 tty1 S+ 14:40 0:00 /bin/sh /usr/bin/mysqld_safe --ndb-nodeid=6
mysql 2719 0.1 5.9 120112 15324 tty1 Sl+ 14:40 0:01 /usr/libexec/mysqld --basedir=/usr --datadir=/usr/var --user=mysql --ndb-nodeid=6 --pid-file
root 2760 0.0 0.3 4492 940 pts/0 R+ 14:50 0:00 ps -aux
2、
root 2799 0.1 0.4 7152 1716 ? Ssl 14:39 0:00 ndb_mgmd --ndb-nodeid=1
root 2810 0.0 0.5 8428 1888 ? Ss 14:39 0:00 ndbd --ndb-nodeid=3
root 2811 1.1 27.1 298996 97904 ? Sl 14:39 0:07 ndbd --ndb-nodeid=3
root 2844 0.0 0.3 5348 1100 tty1 S+ 14:39 0:00 /bin/sh /usr/bin/mysqld_safe --ndb-nodeid=5
mysql 2889 0.1 4.2 120112 15324 tty1 Sl+ 14:39 0:01 /usr/libexec/mysqld --basedir=/usr --datadir=/usr/var --user=mysql --ndb-nodeid=5 --pid-file
root 2918 0.0 0.2 5356 940 pts/0 R+ 14:49 0:00 ps -aux
如果是使用mysqld_safe 单独启动后的话可以进入mysql
[ 本帖最后由 daitaohong 于 2009-11-11 15:05 编辑 ] |
|