mysql 5.6.13 源碼安裝

來源:互聯網
上載者:User

centos 5.6 x86_64


首先你需要安裝一下所需要的包:

yum install gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* make cmake -y


然後 添加使用者:

# groupadd mysql

# useradd -r -g mysql mysql


進行編譯安裝

# tar -zxvf mysql-5.6.13.tar.gz

# cd mysql-5.6.13

[root@xbz mysql-5.6.13]# cmake .

[root@xbz mysql-5.6.13]# make && make install

我這裡比較簡單 ,當然你可以設定很詳細的編譯參數;預設情況下是被安裝在/usr/local/mysql

[root@xbz ~]# chown -R mysql.mysql /usr/local/mysql

[root@xbz ~]# cd /usr/local/mysql/scripts

[root@xbz ~]# ./mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data

[root@xbz~]# cd /usr/local/mysql/support-files

[root@xbz support-files]# cp mysql.server /etc/rc.d/init.d/mysql

[root@xbz support-files]# cp my-default.cnf /etc/my.cnf
[root@xbz support-files]# vim /etc/my.cnf[mysql]
socket=/tmp/mysql.sock
# chkconfig -add mysql

# chkconfig mysql on

# service mysql start# mysql 或者你設定了密碼 mysql -uroot -p)


本文出自 “xbzy” 部落格,請務必保留此出處http://3861088.blog.51cto.com/3851088/1297702

聯繫我們

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