rpm -e mysql --nodeps
groupadd mysql
useradd -g mysql mysql
tar zxvf mysql-5.0.33.tar.gz
cd mysql-5.0.33
./configure --prefix=/usr/local/mysql --with-charset=utf8 --enable-thread-safe-client
make
make install
sh scripts/mysql_install_db
chown -R mysql.mysql /usr/local/mysql/
cp support-files/my-medium.cnf /etc/my.cnf
cp support-files/mysql.server /etc/rc.d/init.d/mysqld
chmod +x /etc/rc.d/init.d/mysqld
chkconfig --add mysqld
chkconfig --level 35 mysqld on
chkconfig --list |grep mysql
service mysqld start
echo 'export PATH=/usr/local/mysql/bin:$PATH' >> /etc/profile
source /etc/profile
如果连接慢,可在service脚本中添加参数:
--skip-name-resolve
阅读(1037) | 评论(0) | 转发(0) |