mysql 5.5 出来后,安装方式也与之前的mysql5.0、5.1有所不同了。
安装工具采用cmake 了,要想安装mysql5.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
To list the configuration options, use one of the following
commands:
- shell> cmake . -L # overview
-
shell> cmake . -LH # overview with help text
-
shell> cmake . -LAH # all params with help text
-
shell> cmake . # interactive display
To prevent old object files or configuration information from
being used, run these commands on Unix before re-running
CMake:
- shell> make clean
-
shell> rm CMakeCache.txt
-
-
Or, on Windows:
-
-
shell> devenv MySQL.sln /clean
-
shell> del CMakeCache.txt
什么含义就不用解释了,应该都能看懂!!!
标准目录:
RHEL5.6+MYSQL5.5.12
cd mysql
cmake . \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql55/ \
-DMYSQL_DATADIR=/usr/local/mysql55/data \
-DMYSQL_UNIX_ADDR=/usr/local/mysql55/tmp/mysqld.socket \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DENABLED_LOCAL_INFILE=1 \
-DMYSQL_TCP_PORT=3306 \
-DEXTRA_CHARSETS=all \
-DMYSQL_USER=mysql \
-DENABLED_PROFILING=on \
-DCURSES_LIBRARY=/usr/lib/libncurses.a \
-DWITH_ZLIB=system \
-DWITH_SSL=system \
-DWITH_LIBWRAP=on \
-DWITH_READLINE=ON \
-DINSTALL_PLUGINDIR=/usr/local/mysql55/plugins \
-DHAVE_LIBAIO_H=/usr/libaio/include/
-DWITH_DEBUG=0
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
make && make install
*
The MyISAM,
MERGE,
MEMORY, and
CSV engines are mandatory (always
compiled into the server) and need not be installed explicitly.
(以上四个存储引擎默认已经永久编译进mysql,不用显示指定了)
*
To compile a storage engine statically into the server, use
-DWITH_engine_STORAGE_ENGINE=1.
(将一个存储引擎静态编译到mysql)
* To exclude a storage engine from the build, use
-DWITHOUT_engine_STORAGE_ENGINE=1.
(除去不需要编译进mysql里面的某个存储引擎)
阅读(1949) | 评论(1) | 转发(0) |