源碼編譯安裝mysql-5.1.40

來源:互聯網
上載者:User

標籤:mysql

系統版本:CentOS6.6_64 Minimal模式

軟體版本:mysql-5.1.40-linux-x86_64-icc-glibc23.tar.gz   h

安裝過程如下:

關閉防火牆以及seLinux

service iptables stop

vim /etc/sysconfi/selinux    //  修改:7 SELINUX=disabled

sync;reboot   //儲存並重新啟動

yum install -y epel-release gcc ntpdate  //安裝epel擴充源 是為了方便安裝依賴包 


cd /usr/local/src/
tar zxvf mysql-5.1.40-linux-x86_64-icc-glibc23.tar.gz
mv mysql-5.1.40-linux-x86_64-icc-glibc23 /usr/local/mysql
groupadd mysql
useradd -g mysql -s /sbin/nologin -M mysql
mkdir -p /data/mysql
chown -R mysql:mysql /data/mysql
cd /usr/local/mysql/
./scripts/mysql_install_db --user=mysql --datadir=/data/mysql
cp support-files/my-large.cnf /etc/my.cnf
cp support-files/mysql.server /etc/init.d/mysqld
chmod 755 /etc/init.d/mysqld 

vim /etc/init.d/mysqld  //設定路徑

.....................................................................................
 46 basedir=/usr/local/mysql
 47 datadir=/data/mysql
.....................................................................................

vim /etc/my.cnf    //紅色字型為增加內容 設定編碼為utf8

.....................................................................................
 22 # Here follows entries for some specific programs
 23 [mysql]
 24 default-character-set = utf8
 25 
 26 # The MySQL server
 27 [mysqld]
 28 character_set_server = utf8
 29 port            = 3306
.....................................................................................

chkconfig --add mysqld
chkconfig mysqld on
service mysqld start

mysql錯誤參考:http://blog.csdn.net/wwj_905/article/details/48000559


本文出自 “菜鳥的成長之路” 部落格,請務必保留此出處http://francis905.blog.51cto.com/3048056/1721911

源碼編譯安裝mysql-5.1.40

聯繫我們

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