mysql 5.1.73 源码_centos5.10下源码编译mysql5.1.73

1. groupadd mysql 2. useradd -g mysql mysql 3. tar -zxvf mysql-5.1.73.tar.gz 4. cd mysql-5.1.73 5. ./configure --prefix=/usr/local/mysql --localstatedir=/data/mysql_db --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --w

1. groupadd mysql

2. useradd -g mysql mysql

3. tar -zxvf mysql-5.1.73.tar.gz

4. cd mysql-5.1.73

5. ./configure --prefix=/usr/local/mysql --localstatedir=/data/mysql_db --with-mysqld-ldflags=-all-static--with-client-ldflags=-all-static--with-extra-charsets=utf8,gbk--with-plugins=innobase,myisam--with-server-suffix=-community--with-unix-socket-path=/usr/local/mysql/sock/mysql.sock

--enable-thread-safe-client--enable-assembler--enable-profiling-without-embedded-server--without-debug--without-bench

./configure

--prefix=/usr/local/mysql //指定mysql安装路径

--localstatedir=/data/mysql_db //指定数据库的库文件存放路径

--with-mysqld-ldflags=-all-static //以静态方式编译服务器端

--with-client-ldflags=-all-static //以静态方式编译客户端

--with-extra-charsets=utf8,gbk //添加utf8、gbk字符集

--with-plugins=innobase,myisam //添加mysql存储引擎

--with-server-suffix=-community //为mysqld版本字符串添加后缀

--with-unix-socket-path=/usr/local/mysql/sock/mysql.sock

--enable-thread-safe-client //以线程方式编译客户端,提高性能

--enable-assembler //使用汇编,提高性能

--enable-profiling //启用profile功能

--without-embedded-server //去除embedded

--without-debug //去除debug模式,提高性能

--without-bench //去除bench模式,提高性能

6. make && make install

7.cp support-files/my-medium.cnf /etc/my.cnf

8./usr/local/mysql/bin/mysql_install_db

--user=mysql &

9. /usr/local/mysql/bin/mysqld_safe -user=mysql &

10. cp support-files/mysql.server

/etc/rc.d/init.d/mysqld

11. chmod 700 /etc/rc.d/init.d/mysqld

12. chkconfig --add

mysqld

13. chkconfig --level

345 mysqld on

14. service mysqld start

15./usr/local/mysql/bin/mysqladmin -uroot password yourpassword

16./usr/local/mysql/bin/mysql -uroot -p yourpassword

本文原创发布php中文网,转载请注明出处,感谢您的尊重!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值