mysql5.6.12 源碼安裝記錄

來源:互聯網
上載者:User

標籤:mysql-5.6.12 源碼

安裝的是mysql5.6.12 資源是從csdn上下載的,官網沒找到這個版本

編譯:

cmake -DCMAKE_ISTALL_PREFIX=/usr/local/mysql -DDEFAULT_CHARSET=utf8 -DMYSQL_USER=mysql -DDEFAULT_COLLATION=utf8_general_ci

若編譯使用utf8字元集 一定要修改預設的collation 否則預設是latin 會有問題
然後make &&make install

然後切換到軟體路徑下 執行初始化指令碼  在scripts下
./mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/mysql.pid --tmpdir=/tmp

指定tmp路徑 pid 運行使用者 主目錄 資料目錄
初始化 看見倆OK即成功
然後建立etc檔案夾 將my.cnf拷貝過來,然後開啟 ,修改:

[mysqld]# Remove leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.# innodb_buffer_pool_size = 128M# Remove leading # to turn on a very important data integrity option: logging# changes to the binary log between backups.#log_bin =datadir = /usr/local/mysql/datalog-error = /var/lib/mysql/mysql.errorgeneral_log = 1general_log_file = /var/lib/mysql/mysql.log# These are commonly set, remove the # and set as required.user = mysqlbasedir = /usr/local/mysqltmpdir = /tmp# datadir = .....port = 3306server_id = 10#socket = ....# Remove leading # to set options mainly useful for reporting servers.# The server defaults are faster for transactions and fast SELECTs.# Adjust sizes as needed, experiment to find the optimal values.# join_buffer_size = 128M# sort_buffer_size = 2M# read_rnd_buffer_size = 2M #sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

然後將support-file裡的mysql.server 拷貝到/etc/init.d/
cp mysql.server /etc/init.d/mysql5
service mysql5 start。。。success
cd bin ,執行./mysql
ok~



這個是從網上看的  具體沒遇到過:

如果出現這個錯誤:--MySQL 5.6.12--Packaging as: mysql-5.6.12-Linux-x86_64--Could NOT find Threads  (missing: Threads_FOUND)--Could NOT find Threads  (missing: Threads_FOUND)--Check if the system is big endian--Searching 16 bit intergerCMake Error at /usr/share/cmake/Modules/TestBigEndian.cmake:31 (MESSAGE):no suitable type foundCall Stack (most recent call first):configure.cmake:621 (TEST_BIG_ENDIAN)CMakeLists.txt:314 (INCLUDE)解決方案很簡單,只要把CMakeCache.txt 這個檔案刪掉就可以了,編譯完後會重建。~~~


本文出自 “FOR THE DREAM” 部落格,請務必保留此出處http://forthedream.blog.51cto.com/11242688/1883951

mysql5.6.12 源碼安裝記錄

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.