有时根据业务需要,会要求实现在一台服务器安装两个mysql。
系统:rhel 5.0(64位) 原装mysql.5.04 端口 3306
要求:在原有基础上再装一个mysql-5.0.77
1:开始:下载源码 mysql-5.0.77.tar.gz
http://downloads.mysql.com/archives.php?p=mysql-5.0
2:服务器上直接下载:
wget -b http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.77.tar.gz
3:cp到/usr/local目录下 并且
复制代码 代码如下:
mkdir -p /usr/local/mysql/data
mkdir -p /usr/local/mysql/tmp
4:解压:tar -zxvf mysql-5.0.77.tar.gz 进入解压目录编译安装:
复制代码 代码如下:
# cd mysql-5.0.77
# ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --with-comment=Source --with-server-suffix=-Community --with-mysqld-user=mysql --without-debug --with-big-tables --with-charset=utf8 --with-collation=utf8_unicode_ci --with-extra-charsets=all --with-pthread --enable-stati