本文目录一览:
Mysql5.5.30使用Cmake编译不通过,报出错误,该如何解决?
应该是版本下载错误
出现该问题大致是因为所需要下载的MySQL版本出现了错误。如果是通过源码来安装,需要:
1.登录MySQL官网,并找到社区版下载地址
2.选择Source Code平台
3.找到符合自己操作系统版本的MySQL,下载即可
怎么查mysql5.5,用cmake安装时的编译参数
# cd /usr/local/mysql5.5/docs
# vim INFO_BIN (其中 Pointer size: 4 一行之后的内容就是所要的参数,需要注意的是,这里的参数的书写格式并不是在执行 cmake 命令时参数的标准格式 ,使用的时候要去掉 :BOOL或 PATH: 等字符)
===== Information about the build process: =====
Build was run at 2014-09-13 23:14:29 on host 'rhel5-8-1.breeze.com'
Build was done on Linux-2.6.18-308.el5 using i686
Build was done using cmake 3.0.2
===== Compiler flags used (from the 'sql/' subdirectory): =====
# compile C with /usr/bin/cc
# compile CXX with /usr/bin/c++
C_DEFINES = -DHAVE_CONFIG_H -DHAVE_EVENT_SCHEDULER -DMYSQL_SERVER
CXX_DEFINES = -DHAVE_CONFIG_H -DHAVE_EVENT_SCHEDULER -DMYSQL_SERVER
Pointer size: 4
===== Feature flags used: =====
-- Cache values
CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
CMAKE_INSTALL_PREFIX:PATH=/usr/local/mysql5.5
COMMUNITY_BUILD:BOOL=ON
mysql 5.5如何编译
首先安装cmake、gcc
然后~~~
1、解压mysql文件,tar xf mysql-5.1.51.tar.gz2、cd mysql-5.1.513、#cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql5.1 //这个就是你指定的安装mysql的位置-DMYSQL_DATADIR=/usr/local/mysql5.6/data -DSYSCONFDIR=/usr/local/mysql5.6/etc -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DENABLED_LOCAL_INFILE=1 -DWITH_EXTRA_CHARSETS=all -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock #make #make install