日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

mysql 5.5 重新编译_源码编译mysql5.5过程记录

發(fā)布時間:2023/12/19 数据库 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mysql 5.5 重新编译_源码编译mysql5.5过程记录 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

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

# 編譯結(jié)束

# 更改用戶和組屬性,執(zhí)行mysql_install_db初始化數(shù)據(jù)庫

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 &

# (以下命令可選)設(shè)置mysql開機(jī)自啟動

shell> cp support-files/mysql.server /etc/init.d/mysql.server

安裝過程并不順利,遇到好幾次錯誤

1.沒有安裝 gcc 和 gcc-c++,執(zhí)行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.編譯快結(jié)束時,又報如下錯誤:

Warning: Bison executable not found in PATH

解決方法:安裝bison

yum install bison

rm CMakeCache.txt

cmake .

#編譯通過

make && make install

#執(zhí)行時間比較長

3.無法啟動mysql

bin/mysqld_safe --user=mysql & 無法啟動

解決方法:

再執(zhí)行一次scripts/mysql_install_db --user=mysql

為什么會這樣,原因不明

總結(jié)

以上是生活随笔為你收集整理的mysql 5.5 重新编译_源码编译mysql5.5过程记录的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。