聽 鐜锛歊HEL 3銆乵ysql-5.0.22 婧愪唬鐮佸寘锛堜笅杞藉湴鍧€锛歨ttp://download.mysql.cn/src/2006/0710/5544.html锛?
鐢?root 鐢ㄦ埛鎵ц浠ヤ笅姝ラ锛?
groupadd mysql
useradd -g mysql mysql
cd /usr/local
tar zxvf /root/mysql-5.0.22.tar.gz # MySQL 婧愪唬鐮佸寘鐨勭粷瀵硅矾寰?
cd mysql-5.0.22
./configure --enable-thread-safe-client --with-unix-socket --with-mysqld-user=mysql --with-charset=gbk --prefix=/usr/local/mysql
make # 杩欎竴姝ユ椂闂磋緝闀?
make WITH_XCHARSET=gbk,bg2312 install
scripts/mysql_install_db
chown -R root /usr/local/mysql
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql
cp support-files/my-medium.cnf /etc/my.cnf聽聽 #the configure file of mysql database (three mode)
/usr/local/mysql/bin/mysqld_safe & # 鍚姩 MySQL
/usr/local/mysql/bin/mysqladmin -u root password 'new-password' # 淇敼 MySQL root 鐢ㄦ埛鍙d护
銆€銆€鑷姩杩愯MySQL
銆€銆€鍦∕ySQL浜岃繘鍒跺寘閲岄潰锛屾湁涓€涓彨myslq.server鐨勫惎鍔ㄨ剼鏈▼搴忋€傛妸瀹冨鍒跺埌/etc/init.d鐩綍閲岄潰锛?銆€銆€
銆€銆€# cd /etc/init.d
銆€銆€# cp /usr/local/mysql/support-files/mysql.server mysql
銆€銆€
銆€銆€鎺ョ潃鎶婂畠鐨勫睘鎬ф敼涓衡€渪鈥濓紙executable锛屽彲鎵ц锛?銆€銆€
銆€銆€# chmod +x mysql
銆€銆€
銆€銆€鏈€鍚庯紝杩愯chkconfig鎶奙ySQL娣诲姞鍒颁綘绯荤粺鐨勫惎鍔ㄦ湇鍔$粍閲岄潰鍘汇€?銆€銆€
銆€銆€# /sbin/chkconfig --del mysql
銆€銆€# /sbin/chkconfig --add mysql
銆€銆€