首页 >

MySQL 5.5 编译详解

数据库|mysql教程MySQL 5.5 编译详解
MySQL编译安装,MySQL 5.5 编译详解,数据库,O
数据库-mysql教程
织梦手机源码,ubuntu 非root,隐藏tomcat版本号,爬虫反搜狗,php管理,韶关市公司seo优化哪家好lzw
MySQL 5.5 编译详解,之前MySQL的编译选项大多数都支持。新旧版本之间的安装选项映射成大写字母,删除选项前面破折号,中间字符间
c 点餐系统源码课设,ubuntu查看动态库,树莓派爬虫背景,js传值到php不能接收到值,随州seo教程lzw
h5 商城源码 下载,vscode调色盘插件,ubuntu 镜像写入,idea中tomcat错误,信宜桌子爬虫,php培训课程-兄弟连,安吉县小红书seo,淘宝刷单网站开源代码,添加视频页面模板lzw

命令参数

系统环境:CentOS 5.7 x86_64

A、安装简介

用户名:mysql
安装目录:/usr/local/mysql-5.5.20
数据库目录:/data/mysql/data
源码包:mysql-5.5.21.tar.gz

自动部署脚本可在 下载

B、安装准备

/data/mysql

下载源码包
wget ://mirror.services.wisc.edu/mysql/ -P /usr/local/src

C、编译安装

mysql-5.5.21

注:详细参数见下文补充内容。

&& make install
注:-j 用来指定CPU核心数,可加快编译速度,,不加也可以。

/usr/local/mysql-5.5.21/

on

/usr/local/mysql-5.5.21/scripts/mysql_install_db –user=mysql \
–defaults-file=/etc/my.cnf \
–basedir=/usr/local/mysql-5.5.21/ \
–datadir=/data/mysql/data/

/etc/profile

补充:
从mysql5.5起,mysql源码安装开始使用cmake。下面是 mysql 5.5 与以前的参数对照:

configure Command
CMake Command

./configure
cmake .

./configure –help
cmake . -LH or ccmake .

Parameter
configure Option
CMake Option
CMake Notes

Installation base directory
–prefix=/usr
-DCMAKE_INSTALL_PREFIX=/usr

mysqld directory
–libexecdir=/usr/sbin
-DINSTALL_SBINDIR=sbin
interpreted relative to prefix

Data directory
–localstatedir=/var/lib/mysql
-DMYSQL_DATADIR=/var/lib/mysql

Config directory (for my.cnf)
–sysconfdir=/etc/mysql
-DSYSCONFDIR=/etc/mysql

Plugin directory
–with-plugindir=/usr/lib64/mysql/plugin
-DINSTALL_PLUGINDIR=lib64/mysql/plugin
interpreted relative to prefix

Man page directory
–mandir=/usr/share/man
-DINSTALL_MANDIR=share/man
interpreted relative to prefix

Shared-data directory
–sharedstatedir=/usr/share/mysql
-DINSTALL_SHAREDIR=share
this is where aclocal/mysql.m4 should be installed

Library installation directory
–libdir=/usr/lib64/mysql
-DINSTALL_LIBDIR=lib64/mysql
interpreted relative to prefix

Header installation directory
–includedir=/usr/include/mysql
-DINSTALL_INCLUDEDIR=include/mysql
interpreted relative to prefix

Info doc directory
–infodir=/usr/share/info
-DINSTALL_INFODIR=share/info
interpreted relative to prefix

Parameter
configure Option
CMake Option
CMake Notes

readline library
–with-readline
-DWITH_READLINE=1

SSL library
–with-ssl=/usr
-DWITH_SSL=system

zlib library
–with-zlib-dir=/usr
-DWITH_ZLIB=system

libwrap library
–without-libwrap
-DWITH_LIBWRAP=0

Parameter
configure Option
CMake Option
CMake Notes

TCP/IP port number
–with-tcp-port-=3306
-DMYSQL_TCP_PORT=3306

UNIX socket file
–with-unix-socket-path=/tmp/mysqld.sock
-DMYSQL_UNIX_ADDR=/tmp/mysqld.sock

Enable LOCAL for LOAD DATA
–enable-local-infile
-DENABLED_LOCAL_INFILE=1

Extra charsets
–with-extra-charsets=all
-DEXTRA_CHARSETS=all
default is “all”

Default charset
–with-charset=utf8
-DDEFAULT_CHARSET=utf8

Default collation
–with-collation=utf8_general_ci
-DDEFAULT_COLLATION=utf8_general_ci

Build the server
–with-server
none

Build the embedded server
–with-embedded-server
-DWITH_EMBEDDED_SERVER=1

libmysqld privilege control
–with-embedded-privilege-control
none
always enabled?

Install the documentation
–without-docs
none

Big tables
–with-big-tables, –without-big-tables
none
tables are big by default

mysqld user
–with-mysqld-user=mysql
-DMYSQL_USER=mysql
mysql is the default

Debugging
–without-debug
-DWITH_DEBUG=0
default is debugging disabled

GIS support
–with-geometry
none
always enabled?

Community features
–enable-community-features
none
always enabled

Profiling
–disable-profiling
-DENABLE_PROFILING=0
enabled by default

pstack
–without-pstack
none
pstack is removed

Assembler string functions
–enable-assembler
none

Build type
–build=x86_64-pc-linux-gnu
no equivalent
unneeded?

Cross-compile host
–host=x86_64-pc-linux-gnu
no equivalent
unneeded?

Client flag
–with-client-ldflags=-lstdc++
none
unneeded

Client flag
–enable-thread-safe-client
none
unneeded, clients are always thread safe

Comment
–with-comment=’string’
-DWITH_COMMENT=’string’

Shared/static binaries
–enable-shared –enable-static
none
there is only DISABLE_SHARED

Memory use
–with-low-memory
none
unneeded


MySQL 5.5 编译详解
  • 源码编译安装 MySQL 5.5.x 笔记
  • 源码编译安装 MySQL 5.5.x 笔记 | 源码编译安装 MySQL 5.5.x 笔记 ...

    MySQL 5.5 编译详解
  • RHEL5.7 64位源码编译安装MySQL-5.5.42遇到的问题
  • RHEL5.7 64位源码编译安装MySQL-5.5.42遇到的问题 | RHEL5.7 64位源码编译安装MySQL-5.5.42遇到的问题 ...

    MySQL 5.5 编译详解
  • MySQL 5.5 自动安装脚本
  • MySQL 5.5 自动安装脚本 | MySQL 5.5 自动安装脚本 ...