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

相關文章

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.