#!/bin/bash
#wirte by badb0y
wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.31.tar.gz/from/http://mysql.easynet.be/
tar -zxvf mysql-5.1.31.tar.gz
cd mysql-5.1.31
./configure --prefix=/usr/local/mysql --with-charset=utf8 --with-extra-charsets=all --enable-assembler --enable-thread-safe-client --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile
make;make install
groupadd mysql
useradd -g mysql mysql
cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
sed -i 's/skip-federated/#skip-federated/g' /etc/my.cnf
/usr/local/mysql/bin/mysql_install_db --user=mysql
chmod +w /usr/local/mysql
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql/.
cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysql
chmod 755 /etc/init.d/mysql
chkconfig --level 345 mysql on
service mysql start
文章出处:DIY部落(http://www.diybl.com/course/6_system/linux/Linuxjs/20090307/159040.html)
#wirte by badb0y
wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.31.tar.gz/from/http://mysql.easynet.be/
tar -zxvf mysql-5.1.31.tar.gz
cd mysql-5.1.31
./configure --prefix=/usr/local/mysql --with-charset=utf8 --with-extra-charsets=all --enable-assembler --enable-thread-safe-client --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile
make;make install
groupadd mysql
useradd -g mysql mysql
cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
sed -i 's/skip-federated/#skip-federated/g' /etc/my.cnf
/usr/local/mysql/bin/mysql_install_db --user=mysql
chmod +w /usr/local/mysql
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql/.
cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysql
chmod 755 /etc/init.d/mysql
chkconfig --level 345 mysql on
service mysql start
文章出处:DIY部落(http://www.diybl.com/course/6_system/linux/Linuxjs/20090307/159040.html)
本文提供了一套详细的指南,用于在Linux环境下从源码安装MySQL 5.1版本。内容包括下载源码包、配置参数、编译安装、设置权限及初始化数据库等步骤。
607

被折叠的 条评论
为什么被折叠?



