Chinaunix首页 | 论坛 | 博客
  • 博客访问: 345879
  • 博文数量: 49
  • 博客积分: 817
  • 博客等级: 军士长
  • 技术积分: 496
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-16 19:05
文章分类

全部博文(49)

文章存档

2014年(6)

2013年(7)

2012年(8)

2011年(28)

分类: Mysql/postgreSQL

2012-11-25 21:30:59

-----Binary安装方法摘自MySQL文件INSTALL-BINARY中

shell> groupadd mysql
shell> useradd -r -g mysql mysql
shell> cd /usr/local
shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
# Next command is optional
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server


-----Source安装方法摘自MySQL文件 INSTALL-SOURCE中
#5.5版本以后使用cmake来编译

# Preconfiguration setup
shell> groupadd mysql
shell> useradd -r -g mysql mysql
# Beginning of source-build specific instructions
shell> tar zxvf mysql-VERSION.tar.gz
shell> cd mysql-VERSION
shell> cmake .
shell> make
shell> make install
# End of source-build specific instructions
# Postinstallation setup
shell> cd /usr/local/mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
# Next command is optional
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server
--------------------------------------------------------------------------------
cmake参数
shell> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
#安装目录
-DMYSQL_DATADIR=/usr/local/mysql/data \
#数据库存放目录
-DMYSQL_UNIX_ADDR=/usr/local/mysql/data/mysql.sock \
#Unix socket 文件路径
-DWITH_MYISAM_STORAGE_ENGINE=1 \
#安装 myisam 存储引擎
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
#安装 innodb 存储引擎
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
#安装 archive 存储引擎
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
#安装 blackhole 存储引擎
-DWITH_PARTITION_STORAGE_ENGINE=1 \
#安装数据库分区
-DENABLED_LOCAL_INFILE=1 \
#允许从本地导入数据
-DWITH_READLINE=1 \
#快捷键功能
-DWITH_SSL=yes \
#支持 SSL
-DDEFAULT_CHARSET=utf8 \
#使用 utf8 字符
-DDEFAULT_COLLATION=utf8_general_ci \
#校验字符
-DEXTRA_CHARSETS=all \
#安装所有扩展字符集
-DMYSQL_TCP_PORT=3306 \
#MySQL 监听端口
阅读(844) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~