資源描述:
《源碼安裝MySQL復(fù)習(xí)過程.doc》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫。
1、源碼安裝MySQL精品文檔Mysql源碼安裝一、文章說明?最近接觸到mysql數(shù)據(jù)庫,因此閑來研究一下,今天演示一下用源碼安裝mysql,如果使用rpm包安裝的話個人感覺挺簡單的。?環(huán)境說明:???操作系統(tǒng):rhel5.4x86???Mysql版本:mysql-5.5.22二、安裝cmake(mysql5.5以后是通過cmake來編譯的)?在mysql5.5之前的話直接編輯就可以,而在5.5以后需要通過cmake來編譯,在附錄中介紹一下直接編譯。?下載cmake-2.8.4.tar.gz,本人是在度娘搜
2、的。[root@node4~]#tar-zxvfcmake-2.8.4.tar.gz[root@node4~]#cdcmake-2.8.4[root@node4cmake-2.8.4]#./configure--prefix=/usr/local/cmake----在這里可以使用#gmake&&makeinstall
[root@node4cmake-2.8.4]#make[root@node4cmake-2.8.4]#makeinstall?備注:configure需要執(zhí)行編譯到目錄。
三、創(chuàng)建mys
3、ql的安裝目錄及數(shù)據(jù)庫存放目錄[root@node4~]#mkdir-p/opt/mysql5.5[root@node4~]#mkdir-p/opt/mysql5.5/data四、創(chuàng)建mysql用戶及用戶組[root@node4~]#groupaddmysql[root@node4~]#useradd-r-gmysqlmysql五、安裝mysql[root@node4~]#tar-zxvfmysql-5.5.22.tar.gz[root@node4~]#cdmysql-5.5.22----編譯出現(xiàn)以下錯
4、誤,需要ncurses-devel[root@node4mysql-5.5.22]#/usr/local/cmake/bin/cmake-DCMAKE_INSTALL_PREFIX=/opt/mysql5.5-DMYSQL_DATADIR=/opt/mysql5.5/data-DDEFAULT_CHARSET=utf8-DDEFAULT_COLLATION=utf8_general_ci-DEXTRA_CHARSETS=all-DENABLED_LOCAL_INFILE=1--MySQL5.5.22--
5、CouldNOTfindCurses(missing:CURSES_LIBRARYCURSES_INCLUDE_PATH)CMakeErroratcmake/readline.cmake:83(MESSAGE):Curseslibrarynotfound.Pleaseinstallappropriatepackage,removeCMakeCache.txtandreruncmake.OnDebian/Ubuntu,packagenameislibncurses5-dev,onRedhatandderi
6、vatesitisncurses-devel.CallStack(mostrecentcallfirst):cmake/readline.cmake:127(FIND_CURSES)cmake/readline.cmake:217(MYSQL_USE_BUNDLED_LIBEDIT)CMakeLists.txt:268(MYSQL_CHECK_READLINE)收集于網(wǎng)絡(luò),如有侵權(quán)請聯(lián)系管理員刪除精品文檔
--Configuringincomplete,errorsoccurred!----查看ncur
7、ses是否安裝:[root@node4mysql-5.5.22]#rpm-qa
8、grepnecursesncurses-5.5-24.20060715----安裝ncurses-devel[root@node4]#rpm-ivhncurses-devel-5.5-24.20060715.i386.rpmwarning:ncurses-devel-5.5-24.20060715.i386.rpm:HeaderV3DSAsignature:NOKEY,keyID37017186Preparing...###
9、########################################[100%]1:ncurses-devel###########################################[100%]----刪除CMakeCache.txt[root@node4mysql-5.5.22]#find/-nameCMakeCache.txt/root/mysql-5.5.22/CMakeCache.txt/root/cmak