2011年10月17日 星期一

Old MySQL Client does not support authentication...

http://dev.mysql.com/doc/refman/5.0/en/old-client.html

Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:\Program Files\Apache Group\Apache2\test\phpBB2\db\mysql4.php


Reset the password to pre-4.1 style for each user that needs to use a pre-4.1 client program. This can be done using the SET PASSWORD statement and the OLD_PASSWORD()function:
mysql> SET PASSWORD FOR
    -> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
Alternatively, use UPDATE and FLUSH PRIVILEGES:
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
    -> WHERE Host = 'some_host' AND User = 'some_user';
mysql> FLUSH PRIVILEGES;

php4 compilation lex error...

http://www.phpbuilder.com/board/archive/index.php/t-7104592.html


./configure --with-mysql=/usr/local/mysql --with-apxs

error is

checking lex output file root... ./configure: lex: command not found
configure: error: cannot find output from lex; giving up

=> I installed flex and bison and everything is humming along

2011年10月13日 星期四

Perl execute telnet command as root

http://ubuntuforums.org/showthread.php?t=19236


# Edit sudoers with visudo
# myuser ALL=(ALL)       NOPASSWD: /mybin/killexe MYEXE
# myuser ALL=(ALL)       NOPASSWD: /mybin/MYEXE

use Net::Telnet ();
   $t = new Net::Telnet (Timeout => 10,
                         Prompt => '/\[myuser\@myhost\ mydir\]\$ $/');
   $t->open("127.0.0.1");
   $t->login("user","password");
   @lines = $t->cmd("who");
   print @lines;

2011年10月9日 星期日

Linux installation URL on XenServer


ftp://my.centos.repo/pub/Linux/CentOS/4.8/os/i386
ftp://ftp.debian.org/debian

mdadm for software RAID on XenServer

http://www.linuxjournal.com/article/8874
http://cns-service.blogspot.com/2007/11/adding-or-deleting-local-storage.html

# mdadm --create /dev/md1 --level=raid5 --raid-devices=3 --chunk=4 /dev/sd{b,c,d}
# mdadm --detail -scan >> /etc/mdadm.conf
# cat /proc/mdstat
# xe sr-create content-type="localSR" type=lvm device-config-device=/dev/md1 shared=false name-label="RAID 5 Storage Group"

to restore/reactive disk arrays on a new server:

# mdadm --detail -scan >> /etc/mdadm.conf
# mdadm -A -s

2011年10月4日 星期二

XP快速設定「互動式登入: 不要顯示上次登入的使用者名稱」

http://www.wretch.cc/blog/ronan863/12210115

透過登錄檔方式建立:

.開啟REGEDIT.EXE
.來到HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System
.建立一個DWORD項目,名稱為「dontdisplaylastusername」,設定值 1 為不要顯示
.若要取消,值是"0"或刪除此項目