源码编译mysql5.5过程记录
来源:互联网 发布:万国数据员工待遇 拉勾 编辑:程序博客网 时间:2024/05/16 19:19
源码编译mysql5.5过程记录 2012-12-06 17:18:29
分类: Mysql/postgreSQL
CentOS6.3源码安装mysql-5.5.27
#mysql5.5以上使用cmake代替configure编译,首先需要安装cmake
yum install cmake
# 建mysql用户和组
shell> groupadd mysql
shell> useradd -r -g mysql mysql
# 解压tgz包,编译mysql
shell> tar zxvf mysql-5.5.27.src.tar.gz
shell> cd mysql-5.5.27
shell> cmake .
shell> make && make install
# 编译结束
# 更改用户和组属性,执行mysql_install_db初始化数据库
shell> cd /usr/local/mysql
shell> chown -R mysql:mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
# (以下命令可选)拷贝配置文件到/etc目录下,启动mysql
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &
# (以下命令可选)设置mysql开机自启动
shell> cp support-files/mysql.server /etc/init.d/mysql.server
安装过程并不顺利,遇到好几次错误
1.没有安装 gcc 和 gcc-c++,执行cmake报如下错误:
==================================================
[root@ice mysql-5.5.27]# cmake .
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error: your C compiler: "CMAKE_C_COMPILER-NOTFOUND" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name.
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
.
.
.
-- Configuring incomplete, errors occurred!
==================================================
解决方法:安装gcc和gcc-c++
yum install gcc
yum install gcc-c++
#删除cache文件,不删除还会报错
rm CMakeCache.txt
cmake .
2.编译快结束时,又报如下错误:
Warning: Bison executable not found in PATH
解决方法:安装bison
yum install bison
rm CMakeCache.txt
cmake .
#编译通过
make && make install
#执行时间比较长
3.无法启动mysql
bin/mysqld_safe --user=mysql & 无法启动
解决方法:
再执行一次scripts/mysql_install_db --user=mysql
为什么会这样,原因不明
0 0
- 源码编译mysql5.5过程记录
- 源码编译安装MySQL5.6.12详细过程
- MySQL5.6.12源码编译安装详细过程
- OpenSift源码编译过程记录
- mysql5.5编译安装过程
- 源码编译安装 Mysql5.5
- mysql5.5源码编译安装
- mysql5.6在Windows下编译,试探过程记录.
- mysql5.7.10 源码编译安装记录 (centos6.4)
- CentOS6.5安装MySQL5.6 过程记录
- vlc-android源码编译过程记录
- vlc-android源码编译过程记录
- vlc-android源码编译过程记录
- android源码下载与编译过程记录
- nifi源码汉化重新编译过程记录
- IDEA下openfire源码编译过程记录
- spring-core-4.04 源码编译过程记录
- vlc-android源码编译过程记录
- 使用Linux命令行测试网速
- android中如何使用DatePicker获取时间
- 不被理解的毛泽东(谈高、粟、彭、刘、林、周、蒋之平生)1
- sql语句的执行顺序
- mysql分区功能详细介绍,以及实例
- 源码编译mysql5.5过程记录
- jq放大镜(好久没写了。差点儿忘了。找个文章)
- android项目变为library项目的问题和解决
- restlet上传图片代码
- vs2010 失效后的解决办法
- 站外优化
- 使用Java向properties存数据
- 关于YAML
- iOS 屏幕方向