1、安裝環(huán)境及介質
#安裝介質,可以到以下網址下載安裝介質,注意下載時選擇source code,當前版本為5.6.17
#源碼安裝方式官方網站鏈接: http://dev.mysql.com/doc/refman/5.6/en/installing-source-distribution.html
2、系統(tǒng)需求
Installation of MySQL from source requires several development tools. Some of these tools are needed no matter whether you use a standard source distribution or a development source tree. Other tool requirements depend on which installation method you use.
To install MySQL from source, your system must have the following tools, regardless of installation method:
CMake, which is used as the build framework on all platforms. CMake can be downloaded from http://www.cmake.org.A good make program. Although some platforms come with their own make implementations, it is highly recommended that you use GNU make 3.75 or newer. It may already be available on your system as gmake. GNU make is available from http://www.gnu.org/software/make/.A working ANSI C++ compiler. GCC 4.2.1 or later, Sun Studio 12 or later, Visual Studio 2010 or later, and many current vendor-supplied compilers are known to work.Perl is needed if you intend to run test scripts. Most Unix-like systems include Perl. On Windows, you can use a version such as ActiveState Perl.#使用源碼安裝上面的一些開發(fā)工具是需要的,比較重要的一個是Cmake工具,通常情況下os并沒有安裝,需要手動安裝。
3、安裝cmake
4、安裝MySQL
..........
remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev,
#如果cmake期間碰到上述錯誤,應該安裝ncurses-devel rpm包,然后移除CMakeCache.txt
#如有沒有對應的os安裝光盤,可以從下面的鏈接下載這個rpm包,注意對應的版本號應一致
SZDB:/usr/local/src/mysql_src/mysql-5.6.17 # rm -rf CMakeCache.txt
SZDB:/usr/local/src/mysql_src/mysql-5.6.17 # make
Linking CXX executable mysqltest_embedded
SZDB:/usr/local/src/mysql_src/mysql-5.6.17 # make install
..........
SZDB:/usr/local/mysql # chown -R root .
#配置環(huán)境變量,通過軟鏈或者修改環(huán)境變量實現(xiàn)(PATH=$PATH:/usr/local/mysql/bin/;export PATH)
#登陸到mysql
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.
mysql> show databases;
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com