日期:2014-05-16  浏览次数:20612 次

mysql5.1.x安装步骤

1、源码安装MySQL?5.1 GA

创建组和用户:

    [root@mysqldb2?~]#?groupadd?mysql

    [root@mysqldb2?~]#?useradd?-g?mysql?mysql

解压缩安装包:

    [root@mysqldb2?~]$?cd?/data/software/

    [root@mysqldb2?software]$?tar?xvfz?mysql-5.1.51.tar.gz?

    [root@mysqldb2?software]$?cd?mysql-5.1.51

进入mysql安装包目录,执行configure并加载适当参数:

    ?[root@mysqldb2?mysql-5.1.51]#?./configure?--prefix=/usr/local/mysql/?--with-server-suffix=-junsansi-edition?--enable-assembler?--enable-local-infile?--enable-thread-safe-client?--with-big-tables?--with-charset=utf8??--with-extra-charsets=gbk,gb2312,utf8,ascii??--with-readline?--with-ssl?--with-embedded-server?--with-pthread?--with-mysqld-user=mysql?--with-mysqld-ldflags=-all-static?--with-client-ldflags=-all-static?--with-plugins=partition,innobase,innodb_plugin?>?/home/jss/mysql_setuplogs_configure.log?2>&1

提示:configure支持的选项非常多,详细的参数及说明建议参考官方文档,也可以通过./configure?--help查看,这里仅列出常用及推荐使用的选项。

  • --prefix=PREFIX:指定程序安装路径;
  • --enable-assembler:使用汇编模式;
  • --enable-local-infile:启用对LOAD?DATA?LOCAL?INFILE语法的支持(默认不支持);
  • --enable-profiling:Build?a?version?with?query?profiling?code?(req.community-features)
  • --enable-thread-safe-client:使用编译客户端;
  • --with-big-tables:启用32位平台对4G大表的支持;
  • --with-charset=CHARSET:指定字符集;
  • --with-collation=:默认collation;
  • --with-extra-charsets=CHARSET,CHARSET,...:指定附加的字符集;
  • --with-fast-mutexes:Compile?with?fast?mutexes
  • --with-readline:
  • --with-ssl:启用SSL的支持;
  • --with-server-suffix=:添加字符