CentOS/RHEL7 源碼安裝Mysql5.5.22

來源:互聯網
上載者:User

標籤:mysql

本文以CentOS7為例,介紹mysql的源碼安裝!


環境介紹:

        作業系統:CentOS7 (安裝時選擇Gnome案頭 及 開發工具)

        軟體:mysql5.5.22.tar.gz


開始安裝:

    安裝前環境準備: yum install ncurses  ncurses-devel  cmake

    1. 建立mysql使用者及組

            # groupadd mysql

            # useradd mysql  -g  mysql -s /sbin/nologin -r

    2. BUILD原始碼

            # tar zxvf mysql5.5.22.tar.gz

            # cd mysql5.5.22

            # cmake .

            # make

            # make install

    3. 進行安裝之後的配置以及初始化

            # cd /usr/local/mysql

            # chown mysql.mysql . -R

            # scripts/mysql_install_db  --user=mysql

            # chown root . -R

            # chown mysql data -R

            # cp support-files/my-medium.cnf /etc/my.cnf

            # bin/mysqld_safe --user=mysql &

            # scripts/mysql_secure_installation [用於刪除mysql匿名使用者以及設定root密碼]

    4. 測試

            # mysql -uroot -p

            # Enter password:****

            mysql>


總結:mysql雖然被甲骨文收購,但是依然是當前市場上使用非常廣泛的資料庫,在mysql被收購之後,現在開源的mariadb基本上可以相容mysql,並且在功能效能上比mysql還要強大!


根據最近社區中相關介紹,2014年使用最多的資料庫是mongoDB(介於SQL and NoSQL之間),其次是Redis(Key -- Value NoSQL資料庫),毫無疑問,Redis是memcache的一個比較理想的替代品,解決了memcache不能進行資料持久化等問題。

本文出自 “Keyman” 部落格,請務必保留此出處http://keyman.blog.51cto.com/9807984/1600812

CentOS/RHEL7 源碼安裝Mysql5.5.22

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.