CopyRight owned by the original author.--(www.MegaEntry.com)
# wget http://dev.mysql.com/get/Downloa ... //mysql.ntu.edu.tw/#解压mysql二进制 到/usr/local下面 cd /usr/local/tar zxf src/mysql-5.*.tar.gz#建立mysql链接的目录,方便以后升级二进制版本,其中数据放在/usr/local/data下面CopyRight owned by the original author.--(www.MegaEntry.com)
cd /usr/localmkdir datamkdir mysqlcd mysql#建立mysql与data的链接ln -s ../data .CopyRight owned by the original author.--(www.MegaEntry.com)
ln -s ../mysql-*/* .cd ../mysql-*/ln -s ../data varcd ../mysqlCopyRight owned by the original author.--(www.MegaEntry.com)
#安装mysql需要的系统运行库yum -y install compat-libstdc -33#下载mysql的配置文件cd /usr/local/mysqlMegaEntry - Social networking and discussion site!
wget http://www1.webterren.com:8080/dl/my.cnf-2G-combin/bin/mv -f my.cnf-2G-combin /etc/my.cnf#权限useradd -d /usr/local/mysql/data mysqlmkdir /home/temp; chown mysql:mysql /home/tempMegaEntry - Social networking and discussion site!
#初始化数据库./scripts/mysql_install_db#自动运行,配置成服务/bin/cp -f support-files/mysql.server /etc/init.d/mysqldMegaEntry - Social networking and discussion site!
chown -R mysql:mysql data ../data#启动mysql/etc/init.d/mysqld start#设置服务启动chkconfig mysql.server onMegaEntry - Social networking and discussion site!
#加入mysql到路径echo pathmunge /usr/local/mysql/bin after > /etc/profile.d/mysql.sh#执行一下,保证mysql在路径环境变量中. /etc/profileCopyRight owned by the original author.--(www.MegaEntry.com)
转自:红联Linux