在Centos5.4上配置MySQL5.5.4-m3的主从复制时在my.cnf里面设置好主从的参数后,MySQL无法启动,查看/var/log/mysql/mysql_error.log发现
/home/DB/mysql/libexec/mysqld: unknown variable ‘master-host=192.168.3.11′ 竟然不认识这个参数?MySQL5.0的一台Slave用这个参数也一直稳定运行.在网上搜索一翻无果,最后只能用手动同步试试去掉/etc/my.cnf里面master-host,master-user这些关于主从配置的参数,启动MySQL,查看日志可以正常启动,进入MySQL后手动执行
mysql> CHANGE MASTER TO
-> MASTER_HOST='master_host_name',
-> MASTER_USER='replication_user_name',
-> MASTER_PASSWORD='
replication_passwor[......]
Monthly Archives: 四月 2010
MySQL5.5.4-m3 复制参数问题
Centos5.4下Moosefs从1.6.13升级到1.6.15
1.6.13版本的安装配置参见
http://www.lsanotes.cn/centos_mfs_1_6_13
升级步骤非常简单官方站也给出了大致步骤
http://www.moosefs.org/mini-howtos.html
1.6.15修复的bugs:
We released a new stable version 1.6.15. This is a maintenance release which includes these changes:
·(daemons) fixed “double free” error
·(metarestore) fixed bugs in “REPAIR” and “SNAPSHOT” entries
·(master) fixed bug in “snapshot” command (“mfsmakesnapshot dir dir/” caused master to hung-up)
·(master) preserving atime and mtime during “snapshot” operation (makes “[......]
Perl单行脚本显示历史命令使用频率
在网上看到这个脚本感觉很不错,记录一下:
history | perl -F"\||<\(|;|\`|\\$\(" -alne 'foreach (@F) { print $1 if /\b((?!do)[a-z]+)\b/i }' | sort | uniq -c | sort -nr 7 sort 6 ls 5 history 5 clear 4 uniq 4 perl 3 telnet 3 head 3 cd 3 alne 2 pwd 1 cat
Perl用Web::Scraper的Xpath方法采集数据放入MySQL
采集新浪一小块新闻的标题.url.内容,并存入MySQL数据库,多谢一位兄弟的帮忙才得以完成.速度还不是很理想,下一步看看能不能用上多线程.一步步提高自己的Perl水平.
#!/usr/bin/perl
use warnings;
use URI;
use Web::Scraper;
use utf8;
binmode(STDIN, ‘:encoding(utf8)’);
binmode(STDOUT, ‘:encoding(utf8)’);
binmode(STDERR, ‘:encoding(utf8)’);
use DBI;
use strict;
my $user = "root";
my $passwd = "123456";
my $data_source = "dbi:mysql:tes20";
my $dbh = DBI->connect($data_source,$user,$passwd, {RaiseError => 1[......]