Linux 下MySQL NDB配置
A) Shutdown management node and data node
devmysql3# ndb_mgm -e shutdown
devmysql4# ndb_mgm -e shutdown
B) Shutdown MySQL proccess
devmysql3# mysqladmin shutdown
devmysql4# mysqladmin shutdown
devmysql3 ip: 10.130.30.217
devmysql4 ip: 10.130.30.218
rpm -ivh MySQL-Cluster-gpl-storage-6.3.20-0.rhel5.x86_64.rpm
rpm -ivh MySQL-Cluster-gpl-tools-6.3.20-0.rhel5.x86_64.rpm
rpm -ivh MySQL-Cluster-gpl-shared-6.3.20-0.rhel5.x86_64.rpm
rpm -ivh MySQL-Cluster-gpl-devel-6.3.20-0.rhel5.x86_64.rpm
rpm -ivh MySQL-Cluster-gpl-server-6.3.20-0.rhel5.x86_64.rpm
rpm -ivh MySQL-Cluster-gpl-client-6.3.20-0.rhel5.x86_64.rpm
rpm -ivh MySQL-Cluster-gpl-management-6.3.20-0.rhel5.x86_64.rpm
rpm -ivh MySQL-Cluster-gpl-extra-6.3.20-0.rhel5.x86_64.rpm
2.Configure MySQL Cluster
mkdir /var/lib/mysql-cluster
cd /var/lib/mysql-cluster
vi config.ini
[ndbd default]
NoOfReplicas = 2
MaxNoOfConcurrentOperations = 2000000
DataMemory = 3000M
IndexMemory = 500M
TimeBetweenWatchDogCheck = 30000
DataDir = /var/lib/mysql-cluster
MaxNoOfOrderedIndexes = 512
StartPartialTimeout = 205
StartPartitionedTimeout = 205
ArbitrationTimeout = 5000
TransactionDeadlockDetectionTimeout = 15000
HeartbeatIntervalDbDb = 5000
StopOnError = 0
TimeBetweenLocalCheckpoints = 15
NoOfFragmentLogFiles = 300
[ndb_mgmd default]
DataDir = /var/lib/mysql-cluster
[ndb_mgmd]
Id = 1
HostName = 10.130.30.217
[ndb_mgmd]
Id = 2
HostName = 10.130.30.218
[ndbd]
Id = 3
HostName = 10.130.30.217
[ndbd]
Id = 4
HostName = 10.130.30.218
[mysqld]
HostName = 10.130.30.217
ArbitrationRank = 2
[mysqld]
HostName = 10.130.30.218
ArbitrationRank = 2
[tcp default]
PortNumber = 63132
vi /etc/my.cnf
[mysqld]
max_connections = 500
default-character-set = utf8
default-storage-engine = ndbcluster
ndbcluster
ndb-connectstring = 10.130.30.217,10.130.30.218
[client]
default-character-set = utf8
[ndbd]
connect-s
相关文档:
query result(14 records)
id
uid
gid
1
11
502
2
107
502
3
100
503
4
110
501
5
112
501
6
104
502
7
100
502
8
100
501
9
102
501
10
104
502
11
100
502
12
100
501
13
102
501
14
110
501
第七条与第十一条重复等
方法一
mysql> create temporary table tmp_wrap ......
来源 http://e-xia.com/2009/06/rownum-in-mysql/
在工作中碰到这样的问题,在生成报表时第一列要输出top 1, top 2, ... , top 10。而mysql并不自带这样的功能。假设我们有这样的一个表:
mysql> create table tbl (
-> id int primary key,
-> col int
-> );
Query OK, 0 ......
1.下载apache源码包,进入页面http://httpd.apache.org/download.cgi,下来后放入/usr/local/src目录中
2.解压:
cd /usr/local/src
tar --zxvf httpd-2.2.15.tar.gz
3.cd httpd-2.2.15
./configure --prefix=/usr/local/src/apache2 \
--enable-so \
--enable-rewrite
make;make install
4.启动服务 service httpd s ......
转载:
现在linux下有越来越多的优秀的播放软件,xmms,m-player,beep-media-player,totme,rhythmbox,等等等等,但是这些播放软件都不能很好的解决mp3文件中文信息乱码的问题。
究其原因,现在网上绝大多数(99%以上)的mp3都是网友在windows下压制的,文字信息编码方式自然是GBK,到了linux下面就没有lftp ......
/ 根目录
/bin 常用的命令 binary file 的目錄
/boot 存放系统启动时必须读取的档案,包括核心 (kernel) 在内
/boot/grub/menu.lst GRUB ......