01 # 安装mysql
02 su - work
03 cd $HOME/local/src
05 tar zxvf mysql-5.1.49.tar.gz
06 cd mysql-5.1.49
07 ./configure --prefix=/home/work/local/mysql --with-charset=utf8 --with-extra-charsets=gbk,utf8,ascii,big5,latin1,binary --localstatedir=/home/work/local/mysql --with-plugins=all --with-pthread --enable-static --enable-thread-safe-client --enable-assembler --without-ndb-debug --with-unix-socket-path=/home/work/local/mysql/tmp/mysql.sock --with-mysqld-user=work
08 make
09 make install
10 mkdir -p /home/work/local/mysql/{tmp,log,data,etc}
11 touch /home/work/local/mysql/tmp/mysql.sock
12 /home/work/local/mysql/bin/mysql_install_db --datadir=/home/work/local/mysql/data
13 wget
ftp://pmo:pmo@ftp.iit.baidu.com/07.online-soft/my_master.cnf -P /home/work/local/mysql/etc
14 cd /home/work/local/mysql/etc
15 mv my_master.cnf my.cnf
16
17
18 # 启动mysql
19 su - work
20 /home/work/local/mysql/bin/mysqld_safe &