mysql优化选项

cd mysql-5.0.27
# CHOST="i686-pc-linux-gnu" CFLAGS="-O3 -msse2 -mmmx -mfpmath=sse -mcpu=pentium4 -march=pentium4 -pipe -fomit-frame-pointer" CXXFLAGS="-O3 -msse2 -mmmx -mfpmath=sse -funroll-loops -mcpu=pentium4 -march=pentium4 -pipe -fomit-frame-pointer"  ./configure --prefix=/usr/local/mysql  --localstatedir=/var/lib/mysql  --with-comment=Source  --with-server-suffix=-Community  --with-mysqld-user=mysql  --without-debug  --with-big-tables  --with-charset=latin1  --with-collation=latin1_swedish_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-innodb  --without-ndb-debug


配置成功会提示:

MySQL has a Web site at http://www.mysql.com/ which carries details on the
latest release, upcoming features, and other information to make your
work or play with MySQL more productive. There you can also find
information about mailing lists for MySQL discussion.

Remember to check the platform specific part of the reference manual for
hints about installing MySQL on your platform. Also have a look at the
files in the Docs directory.

Thank you for choosing MySQL!

# make
编译的时间可能会比较长,毕竟优化的比较厉害。

# make install

编译安装完成后执行后续操作:
   # useradd mysql   //添加 mysql 用户
   # cd /usr/local/mysql
   # bin/mysql_install_db --user=mysql
   # chown -R root:mysql .   //设置权限,注意后面有一个 "."
   # chown -R mysql /var/lib/mysql   //设置 mysql 目录权限
   # chgrp -R mysql .   //注意后面有一个 "."
   # cp share/mysql/my-huge.cnf /etc/my.cnf
   # cp share/mysql/mysql.server /etc/rc.d/init.d/mysqld   //开机自动启动 mysql。
   # chmod 755 /etc/rc.d/init.d/mysqld
   # chkconfig --add mysqld
   # /etc/rc.d/init.d/mysqld start   //启动 MySQL
   # bin/mysqladmin -u root password "123456789"
   # service mysqld stop   //关闭 MySQL 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值