groupadd mysqluseradd -g mysql mysqltar zxvf mysql-5.0.46.tar.gz;cd mysql-5.0.46;
./configure --prefix=/usr/local/mysql --localstatedir=/data/mysql --with-comment=Source --with-server-suffix=-enterprise-gpl --with-mysqld-user=mysql --without-debug --with-big-tables --with-charset=utf8 --with-collation=utf8_general_ci --with-extra-charsets=all --with-pthread --enable-static --enable-thread-safe-client --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler --without-ndb-debug --without-isam
make
make install
cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
bin/mysql_install_db --user=mysql
chown -R root .
chown -R mysql/data/mysql
chgrp -R mysql .
rm -f /usr/bin/mysqld_saferm -f /usr/bin/mysqldrm -f /usr/bin/mysqlrm -f /usr/bin/mysqldump
ln -s /usr/local/mysql/bin/mysqld_safe /usr/bin/mysqld_safe
ln -s /usr/local/mysql/share/mysql/mysql.server /usr/bin/mysqld
ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql
ln -s /usr/local/mysql/bin/mysqldump /usr/bin/mysqldumprm -rf /usr/lib/mysqlrm -rf /usr/include/mysql
ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql
ln -s /usr/local/mysql/include/mysql /usr/include/mysql
echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
ldconfig
cp support-files/mysql.server /etc/rc.d/init.d/mysqld
chmod 777 /etc/init.d/mysqld
chkconfig --add mysqld
chkconfig --level35 mysqld on