国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數據庫 > MySQL > 正文

Centos5.5中安裝Mysql5.5過程分享

2024-07-24 12:46:29
字體:
來源:轉載
供稿:網友

這幾天在centos下裝mysql,這里記錄一下安裝的過程,方便以后查閱

Mysql5.5.37安裝需要cmake,5.6版本開始都需要cmake來編譯,5.5以后的版本應該也要裝這個。

安裝cmake

復制代碼 代碼如下:

[root@local ~]# wget http://www.cmake.org/files/v2.8/cmake-2.8.12.2.tar.gz
[root@local ~]# tar xvf cmake-2.8.12.2.tar.gz
[root@local ~]# cd cmake-2.8.12.2
[root@local cmake-2.8.12.2]#./bootstrap
[root@local cmake-2.8.12.2]# make
[root@local cmake-2.8.12.2]# make install

安裝mysql

復制代碼 代碼如下:

[root@local ~]# wget http://cdn.mysql.com/Downloads/MySQL-5.5/mysql-5.5.37.tar.gz
[root@local ~]# tar xvf mysql-5.5.37.tar.gz
[root@local ~]# cd mysql-5.5.37
[root@local mysql-5.5.37]# cmake ./

可能還會報這個錯,沒有就跳過

復制代碼 代碼如下:

CMake Error at cmake/readline.cmake:83(MESSAGE):
Curses library not found.  Pleaseinstall appropriate package,
remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name islibncurses5-dev, on Redhat and derivates it is ncurses-devel.
Call Stack (most recent call first):
 cmake/readline.cmake:127 (FIND_CURSES)
 cmake/readline.cmake:217 (MYSQL_USE_BUNDLED_LIBEDIT)
 CMakeLists.txt:355 (MYSQL_CHECK_READLINE
-- Configuring incomplete, errors occurred!
See also "/root/my/mysql-5.5.37/CMakeFiles/CMakeOutput.log".
See also"/root/my/mysql-5.5.37/CMakeFiles/CMakeError.log".

說明centos系統沒有ncurses-devel

復制代碼 代碼如下:

[root@local ~]# wget http://invisible-island.net/datafiles/release/ncurses.tar.gz
[root@local ~]# cd ncurses-5.9
[root@local ncurses-5.9]#./configure
[root@local ncurses-5.9]# make
[root@local ncurses-5.9]# make install

再刪除剛才編譯生成的 CMakeCache.txt 文件,否則無法進行下一步

復制代碼 代碼如下:

[root@local mysql-5.5.37]# rm -f CMakeCache.txt

繼續編譯mysql

復制代碼 代碼如下:

[root@local ~]# cmake ./
[root@local ~]# make
[root@local ~]# make install

這樣,mysql默認將成功安裝到/usr/local/mysql

創建mysql用戶組

復制代碼 代碼如下:

[root@local ~]# groupadd mysql
[root@local ~]# useradd –r –g mysql mysql
[root@local ~]# chown –R mysql.mysql /usr/local/mysql

啟動mysql

復制代碼 代碼如下:

[root@local ~]# /usr/local/mysql/bin/mysqld_safe --user=mysql 

這里可能會發生錯誤,沒有就跳過:

復制代碼 代碼如下:
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 陆良县| 平凉市| 论坛| 贵溪市| 卓尼县| 肃北| 抚远县| 滨海县| 保定市| 绿春县| 高要市| 宜君县| 广丰县| 兰考县| 泸定县| 陕西省| 邹城市| 江城| 子洲县| 吉首市| 大庆市| 综艺| 台北县| 永春县| 买车| 尚志市| 偃师市| 德阳市| 香河县| 广东省| 浏阳市| 武山县| 务川| 新绛县| 寿阳县| 比如县| 兰坪| 南京市| 海淀区| 南雄市| 青铜峡市|