最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

SUSE Linux下源碼編譯方式安裝MySQL 5.6過程分享

 更新時(shí)間:2014年09月16日 10:10:45   投稿:junjie  
這篇文章主要介紹了SUSE Linux下源碼編譯方式安裝MySQL 5.6過程分享,本文使用SUSE Linux Enterprise Server 10 SP3 (x86_64)系統(tǒng),需要的朋友可以參考下

MySQL為開源數(shù)據(jù)庫(kù),因此可以基于源碼實(shí)現(xiàn)安裝?;谠创a安裝有更多的靈活性。也就是說我們可以針對(duì)自己的硬件平臺(tái)選用合適的編譯器來優(yōu)化編譯后的二進(jìn)制代碼,根據(jù)不同的軟件平臺(tái)環(huán)境調(diào)整相關(guān)的編譯參數(shù),選擇自身需要選擇不同的安裝組件,設(shè)定需要的字符集等等一些可以根據(jù)特定應(yīng)用場(chǎng)景所作的各種調(diào)整。本文描述了如何在源碼方式下安裝MySQL。

1、安裝環(huán)境及介質(zhì)

復(fù)制代碼 代碼如下:

#安裝環(huán)境
SZDB:~ # cat /etc/issue
Welcome to SUSE Linux Enterprise Server 10 SP3 (x86_64) - Kernel \r (\l).
SZDB:~ # uname -a
Linux SZDB 2.6.16.60-0.54.5-smp #1 SMP Fri Sep 4 01:28:03 UTC 2009 x86_64 x86_64 x86_64 GNU/Linux
#安裝介質(zhì),可以到以下網(wǎng)址下載安裝介質(zhì),注意下載時(shí)選擇source code,當(dāng)前版本為5.6.17
#根據(jù)你自身的環(huán)境下載相應(yīng)的安裝介質(zhì),本文演示的安裝介質(zhì)為Generic Linux (Architecture Independent), mysql-5.6.17.tar.gz
http://dev.mysql.com/downloads/mysql/
#源碼安裝方式官方網(wǎng)站鏈接: http://dev.mysql.com/doc/refman/5.6/en/installing-source-distribution.html

2、系統(tǒng)需求

復(fù)制代碼 代碼如下:

Source Installation System Requirements
  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ā)工具是需要的,比較重要的一個(gè)是Cmake工具,通常情況下os并沒有安裝,需要手動(dòng)安裝。
#如果沒有cmake會(huì)收到這個(gè)錯(cuò)誤提示:(-bash: cmake: command not found)

3、安裝cmake

復(fù)制代碼 代碼如下:

#可以到這里下載cmake,我這里下載的是2.6.4版本
http://www.cmake.org/cmake/resources/software.html
SZDB:~ # cd /usr/local/src/mysql_src
SZDB:/usr/local/src/mysql_src # tar -xvf cmake-2.6.4.tar.gz
SZDB:/usr/local/src/mysql_src # cd cmake-2.6.4
SZDB:/usr/local/src/mysql_src/cmake-2.6.4 # ./bootstrap 
SZDB:/usr/local/src/mysql_src/cmake-2.6.4 # ./make
SZDB:/usr/local/src/mysql_src/cmake-2.6.4 # ./make install

4、安裝MySQL

復(fù)制代碼 代碼如下:

SZDB:~ # groupadd mysql
SZDB:~ # useradd -r -g mysql mysql
SZDB:~ # cd /usr/local/src/mysql_src
SZDB:/usr/local/src/mysql_src # tar -xvf mysql-5.6.17.tar.gz
SZDB:/usr/local/src/mysql_src # ls
mysql-5.6.17  mysql-5.6.17.tar.gz
SZDB:/usr/local/src/mysql_src # cd mysql-5.6.17/
SZDB:/usr/local/src/mysql_src/mysql-5.6.17 # cmake .
             ..........
  -- Check size of wint_t - done
  -- Could NOT find Curses  (missing:  CURSES_LIBRARY CURSES_INCLUDE_PATH)
  CMake Error at cmake/readline.cmake:85 (MESSAGE):                 Author : Leshami
    Curses library not found.  Please install appropriate package,  Blog   : http://blog.csdn.net/leshami
    remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev,
    on Redhat and derivates it is ncurses-devel.
  Call Stack (most recent call first):
    cmake/readline.cmake:128 (FIND_CURSES)
    cmake/readline.cmake:202 (MYSQL_USE_BUNDLED_EDITLINE)
    CMakeLists.txt:411 (MYSQL_CHECK_EDITLINE)
#如果cmake期間碰到上述錯(cuò)誤,應(yīng)該安裝ncurses-devel rpm包,然后移除CMakeCache.txt
-- Configuring incomplete, errors occurred!
#如有沒有對(duì)應(yīng)的os安裝光盤,可以從下面的鏈接下載這個(gè)rpm包,注意對(duì)應(yīng)的版本號(hào)應(yīng)一致
http://www.filewatcher.com/m/ncurses-devel-5.5-18.11.x86_64.rpm.735840-0.html
SZDB:/usr/local/src/mysql_src # rpm -Uvh ncurses-devel-5.5-18.11.x86_64.rpm
Preparing...                ########################################### [100%]
   1:ncurses-devel          ########################################### [100%]
SZDB:/usr/local/src/mysql_src/mysql-5.6.17 # rm -rf CMakeCache.txt
SZDB:/usr/local/src/mysql_src/mysql-5.6.17 # cmake .      #再次執(zhí)行cmake
             
                 ........
   -- Library mysqlserver depends on OSLIBS -lpthread;m;rt;crypt;dl;aio
   -- Configuring done
   -- Generating done
   -- Build files have been written to: /usr/local/src/mysql_src/mysql-5.6.17
SZDB:/usr/local/src/mysql_src/mysql-5.6.17 # make
   Linking CXX executable mysqltest_embedded
   [100%] Built target mysqltest_embedded
   Scanning dependencies of target my_safe_process
   [100%] Building CXX object mysql-test/lib/My/SafeProcess/CMakeFiles/my_safe_process.dir/safe_process.cc.o
   Linking CXX executable my_safe_process
   [100%] Built target my_safe_process
SZDB:/usr/local/src/mysql_src/mysql-5.6.17 # make install
SZDB:/usr/local/src/mysql_src/mysql-5.6.17 # cd /usr/local/mysql
SZDB:/usr/local/mysql # chown -R mysql .
SZDB:/usr/local/mysql # chgrp -R mysql .
SZDB:/usr/local/mysql # scripts/mysql_install_db --user=mysql
                    ..........
    To start mysqld at boot time you have to copy
    support-files/mysql.server to the right place for your system
   
    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    To do so, start the server, then issue the following commands:
   
      ./bin/mysqladmin -u root password 'new-password'
      ./bin/mysqladmin -u root -h SZDB password 'new-password'
   
    Alternatively you can run:
   
      ./bin/mysql_secure_installation
   
    which will also give you the option of removing the test
    databases and anonymous user created by default.  This is
    strongly recommended for production servers.
   
    See the manual for more instructions.
   
    You can start the MySQL daemon with:
   
      cd . ; ./bin/mysqld_safe &
   
    You can test the MySQL daemon with mysql-test-run.pl
   
      cd mysql-test ; perl mysql-test-run.pl
  
    New default config file was created as ./my.cnf and
    will be used by default by the server when you start it.
    You may edit this file to change server settings
         ..........
SZDB:/usr/local/mysql # chown -R root .
SZDB:/usr/local/mysql # chown -R mysql data    
SZDB:/usr/local/mysql # cp support-files/mysql.server /etc/init.d/mysql.server  #配置自啟動(dòng)
SZDB:/usr/local/mysql # cp support-files/my-default.cnf /etc/my.cnf             #添加缺省的my.cnf配置文件 
SZDB:/usr/local/mysql # bin/mysqld_safe --user=mysql &                          #啟動(dòng)mysql
[1] 21004
SZDB:/usr/local/mysql # 140521 02:54:54 mysqld_safe Logging to '/usr/local/mysql/data/SZDB.err'.
140521 02:54:54 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
#配置環(huán)境變量,通過軟鏈或者修改環(huán)境變量實(shí)現(xiàn)(PATH=$PATH:/usr/local/mysql/bin/;export PATH)
 
SZDB:~ # ln -fs /usr/local/mysql/bin/mysql /usr/local/bin 
SZDB:~ # ln -fs /usr/local/mysql/bin/mysqladmin /usr/local/bin 
SZDB:~ # ln -fs /usr/local/mysql/bin/mysqld_safe /usr/local/bin
#登陸到mysql
SZDB:/usr/local/bin # mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.17 Source distribution
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.00 sec)

相關(guān)文章

  • 關(guān)于mysql中string和number的轉(zhuǎn)換問題

    關(guān)于mysql中string和number的轉(zhuǎn)換問題

    這篇文章主要介紹了關(guān)于mysql中string和number的轉(zhuǎn)換問題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2022-06-06
  • MySQL產(chǎn)生死鎖原因分析講解

    MySQL產(chǎn)生死鎖原因分析講解

    死鎖指的是在兩個(gè)或兩個(gè)以上不同的進(jìn)程或線程中,由于存在共同資源的競(jìng)爭(zhēng)或進(jìn)程(或線程)間的通訊而導(dǎo)致各個(gè)線程間相互掛起等待,如果沒有外力作用,最終會(huì)引發(fā)整個(gè)系統(tǒng)崩潰
    2022-12-12
  • Xtrabackup使用指南 InnoDB數(shù)據(jù)備份工具

    Xtrabackup使用指南 InnoDB數(shù)據(jù)備份工具

    Xtrabackup是一個(gè)對(duì)InnoDB做數(shù)據(jù)備份的工具,支持在線熱備份(備份時(shí)不影響數(shù)據(jù)讀寫),是商業(yè)備份工具InnoDB Hotbackup的一個(gè)很好的替代品
    2011-10-10
  • MySQL中關(guān)于null值的一個(gè)小問題

    MySQL中關(guān)于null值的一個(gè)小問題

    這篇文章主要介紹了MySQL中關(guān)于null值的一個(gè)小問題,幫助大家更好的理解和學(xué)習(xí)使用MySQL,感興趣的朋友可以了解下
    2021-03-03
  • 詳解SparkSql輸出數(shù)據(jù)的方式

    詳解SparkSql輸出數(shù)據(jù)的方式

    在處理數(shù)據(jù)時(shí),SparkSql提供了多種數(shù)據(jù)輸出方式,包括普通文件輸出、保存到數(shù)據(jù)庫(kù)和保存到Hive,普通文件輸出支持追加模式、覆寫模式、報(bào)錯(cuò)模式和忽略模式,本文介紹SparkSql輸出數(shù)據(jù)的方式,感興趣的朋友一起看看吧
    2024-11-11
  • MySQL數(shù)據(jù)庫(kù)高級(jí)查詢和多表查詢

    MySQL數(shù)據(jù)庫(kù)高級(jí)查詢和多表查詢

    這篇文章主要介紹了MySQL數(shù)據(jù)庫(kù)高級(jí)查詢和多表查詢,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2020-08-08
  • 從云數(shù)據(jù)遷移服務(wù)看MySQL大表抽取模式的原理解析

    從云數(shù)據(jù)遷移服務(wù)看MySQL大表抽取模式的原理解析

    這篇文章主要介紹了從云數(shù)據(jù)遷移服務(wù)看MySQL大表抽取模式的原理解析,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2021-02-02
  • 揭開SQL中NULL的神秘面紗

    揭開SQL中NULL的神秘面紗

    表的字段默認(rèn)允許存放NULL值,這意味著,您在插入記錄或者更新記錄時(shí),可以不為該字段指定值,此時(shí)該字段將存儲(chǔ)NULL值,這篇文章將揭開SQL中NULL的神秘面紗。這個(gè)問題可能困擾著很多初級(jí)開發(fā)者
    2023-01-01
  • CentOS7編譯安裝MySQL5.7.24的教程詳解

    CentOS7編譯安裝MySQL5.7.24的教程詳解

    這篇文章主要介紹了CentOS7編譯安裝MySQL5.7.24的教程,非常不錯(cuò),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2018-12-12
  • MySql數(shù)據(jù)庫(kù)自動(dòng)遞增值問題

    MySql數(shù)據(jù)庫(kù)自動(dòng)遞增值問題

    這篇文章主要介紹了MySql數(shù)據(jù)庫(kù)自動(dòng)遞增值問題的相關(guān)資料,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下
    2016-07-07

最新評(píng)論

上饶县| 麻阳| 昔阳县| 榆中县| 灵寿县| 五指山市| 荥经县| 晋宁县| 南安市| 乌兰县| 甘谷县| 玉环县| 芒康县| 郁南县| 五台县| 铜鼓县| 阿瓦提县| 即墨市| 黄大仙区| 阿尔山市| 稻城县| 乐清市| 汝阳县| 美姑县| 新龙县| 景东| 赤峰市| 明溪县| 鄄城县| 高密市| 延吉市| 汕头市| 宁阳县| 华坪县| 广宗县| 翁牛特旗| 辽源市| 新闻| 邯郸县| 峨边| 元阳县|