Archive for category MySQL知识库

mysqld: unknown variable ‘master-host=

Are you trying to setup on replication on mysql5.5+ ? ok. then that’s the issue.

The following options are removed in MySQL 5.5. If you attempt to start mysqld with any of these options in MySQL 5.5, the server aborts with an unknown variable error.

–master-host
–master-user
–master-password
–master-port

Solution, comment the master- related variables. Read the rest of this entry »

No Comments

Create Ur own Repo for CentOS or RPM base distro

1. create ur own packages, put it into www home directory. let clients can visit from network
such as /var/www/html/my_repo
http://my_ip/my_repo even ftp://my_ip/my_repo

2. create u repo files on clients
e.g.
cat /etc/yum.repos.d/ceph.repo
[ceph]
name=My Cluster Repo $basearch
baseurl=http://my_ip/my_repo
enabled=1
gpgcheck=0 # if u read further, we should change it to “1″ for security.

3. yum search some_pkgs
u should get ur repo now.

Read the rest of this entry »

,

No Comments

MySQL分区的限制以及性能问题

MySQL 5.1.30 新版支持分区方案,大家都跃跃欲试,先来看看它的一些限制

Partitioning 的限制
1. 创建Partition禁止使用存储过程,声明变量或者用户定义的变量。
2. 创建Partition可以使用”+,-,*”数学运算符,但是结果必须是整数或者NULL([LINEAR] KEY分区方案除外),从5.1.23开始,支持”DIV”,但是不允许”/”, 从5.1.12开始,不允许”|, & , ^ , <<, ~”等位运算符。

性能方面的考虑
文件系统,MySQL启动large_files_support,对于MyISAM 存储引擎, 增加 myisam_max_sort_file_size  可能会提升性能;
存储引擎,MyISAM在分区操作,查询,更新等操作中,优于InnoDB,NDB。
最大分区数, 对于指定的表,最大分区数是1024,其中包括子分区。
不支持 Foreign keys。
不支持FULLTEXT索引。
临时表不能使用分区。
partitioning key 必须是整数或者是通过转化可以变成整数的列
不支持主键缓存

更多资料 http://dev.mysql.com/doc/refman/5.1/en/partitioning-limitations.html

No Comments

压力测试之MySQL

系统 CentOS 5.1 x86_64

Step1 install ltp (linux test packages)
rpm -ivh bglibs-1.104-1.x86_64.rpm bglibs-devel-1.104-1.x86_64.rpm
cp /usr/include/unix/* /usr/include/sys/
tar xvzf ltp-full-20081130.tgz
make && make install

Read the rest of this entry »

No Comments