mysql 5.0 编译,编译安装mysql-5.0.46

groupadd mysqluseradd -g mysql mysqltar zxvf mysql-5.0.46.tar.gz;cd mysql-5.0.46;

./configure --prefix=/usr/local/mysql --localstatedir=/data/mysql --with-comment=Source --with-server-suffix=-enterprise-gpl --with-mysqld-user=mysql --without-debug --with-big-tables --with-charset=utf8 --with-collation=utf8_general_ci --with-extra-charsets=all --with-pthread --enable-static --enable-thread-safe-client --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler --without-ndb-debug --without-isam

make

make install

cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf

cd /usr/local/mysql

bin/mysql_install_db --user=mysql

chown -R root .

chown -R mysql/data/mysql

chgrp -R mysql .

rm -f /usr/bin/mysqld_saferm -f /usr/bin/mysqldrm -f /usr/bin/mysqlrm -f /usr/bin/mysqldump

ln -s /usr/local/mysql/bin/mysqld_safe /usr/bin/mysqld_safe

ln -s /usr/local/mysql/share/mysql/mysql.server /usr/bin/mysqld

ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql

ln -s /usr/local/mysql/bin/mysqldump /usr/bin/mysqldumprm -rf /usr/lib/mysqlrm -rf /usr/include/mysql

ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql

ln -s /usr/local/mysql/include/mysql /usr/include/mysql

echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf

ldconfig

cp support-files/mysql.server /etc/rc.d/init.d/mysqld

chmod 777 /etc/init.d/mysqld

chkconfig --add mysqld

chkconfig --level35 mysqld on

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值