php , date_default_timezone_set
Sets the default timezone used by all date/time functions in a script
date_default_timezone_set( “Asia/Taipei” );
4 Fun
Archive for March 2008
Sets the default timezone used by all date/time functions in a script
date_default_timezone_set( “Asia/Taipei” );
show status like ‘Qcache%’;
explain select …..
分析 schema
echo “select * from tbl_item procedure analyse()\G” | mysql db_name > ana.txt
set GLOBAL query_cache_size=0
On Unix, each TCP/IP connection uses a file descriptor, so you must increase the total number of descriptors available to the operating system, and also increase the maximum number of descriptors each process is allowed to use. All Unix style operating systems have a “ulimit” shell command (sh and bash) which can allow more open file descriptors to commands started in that shell, once the appropriate kernel tweak has been made. We recommend “ulimit -n 8192″. Here are our recommended kernel tweaks:
Linux: “echo 65536 > /proc/sys/fs/file-max” changes the number of system-wide file descriptors
FreeBSD: append to /etc/sysctl (or you can use sysctl -w to add these)
kern.maxfiles=65536
kern.maxfilesperproc=32768
Solaris: add the following to /etc/system and reboot:
set rlim_fd_max=0×8000
set rlim_fd_cur=0×8000
You can check the same tips from here.Here is very useful tips for all mysql DBA’s,
Developers these tips are noted from MySQL Camp 2006 suggested by mysql community experts. Continue reading ‘Top 84 MySQL Performance Tips’ »
chkconfig –level 234 httpd on
# pkgadd -d . SFWgcc2l
-bash-3.00$ cat .profile
export TERM=”vt100″
export EDITOR=”vi”
export PATH=”/usr/local/bin:/opt/sfw/bin:/usr/ucb:/bin:/sbin:/usr/bin:/usr/sbin:$PATH”
export LC_CTYPE=”en_US.ISO_8859-1″
alias h=”history 300″
umask 022
[code language='sh']
umask 022
set path=(/usr/ucb /usr/local/bin /usr/ccs/bin /usr/X/bin /usr/sbin /bin /usr/bin /etc)
#set prompt="`whoami`@`hostname`:`pwd`% "
if ( $?prompt ) then
set history=32
endif
#set prompt="`whoami`@`hostname -s`:`pwd`%"
#alias cd ' chdir \!*; set prompt="`whoami`@`hostname`:`pwd`%"'
unset autologout
alias cd 'chdir \!*; set prompt="\n`whoami`@`hostname`:`pwd`% \n[%h] "'
set prompt="\n`whoami`@`hostname`:`pwd`% \n[%h] "
alias pu ' pushd \!*; set prompt="\n`whoami`@`hostname`:`pwd`% \n[%h] "'
alias po ' popd; set prompt="\n`whoami`@`hostname`:`pwd`% \n[%h] "'
alias cp 'cp -i'
alias mv 'mv -i'
alias rm 'rm -i'
alias del 'rm -i'
alias m more
set path = ($path ./)
alias h 'history 25'
alias j 'jobs -l'
alias la 'ls -a'
alias lf 'ls -FA'
alias ll 'ls -lA'
setenv LD_LIBRARY_PATH /usr/local/lib/mysql
alias joe 'joe -asis -nobackups -noxon'
[/code]