源码编译mysql5.5过程记录
2014-01-23 11:22
525 查看
源码编译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
为什么会这样,原因不明
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
为什么会这样,原因不明
相关文章推荐
- 源码编译mysql 5.5+ 安装过程全记录
- 源码编译mysql 5.5+ 安装过程全记录
- Linux下源码编译MySQL 5.5 与安装过程全记录
- Linux下源码编译MySQL 5.5 与安装程全记录
- 将gdal源码转化为VS工程编译过程记录
- mysql-5.5源码编译安装(附参数对照表)
- Ubuntu14.04 32bit编译Android2.3.4源码全过程记录
- mysql5.7.10 源码编译安装记录 (centos6.4)
- mysql-5.5源码编译安装(附参数对照表)
- vlc-android源码编译过程记录
- 简单记录全志平台编译android源码过程
- Android源码编译的全过程记录
- mysql5.7.10 源码编译安装记录 (centos6.4)【转】
- mysql5.5源码包编译安装
- DRML(2016-CVPR)重现过程记录---(1)caffe+DRML源码编译
- Android源码编译的全过程记录
- kibana 5.5 源码编译踩坑记录
- CentOS 7 源码编译安装 MySQL 5.7记录
- Android Octa源码编译和下载过程详细记录
- linux下mysql 5.5源码编译安装