CentOS 6.5通過yum安裝 MySQL-5.5

來源:互聯網
上載者:User

CentOS 6.5通過yum安裝 MySQL-5.5

1.安裝mysql-5.5的yum源

rpm -ivh http://repo.mysql.com/yum/mysql-5.5-community/el/6/x86_64/mysql-community-release-el6-5.noarch.rpm

2.修改安裝好的yum源

編輯 /etc/yum.repos.d/mysql-community.repo檔案,將5.5的enabled改為1,5.6的enabled改為0

# Enable to use MySQL 5.5[mysql55-community]name=MySQL 5.5 Community Serverbaseurl=http://repo.mysql.com/yum/mysql-5.5-community/el/6/$basearch/enabled=1gpgcheck=1gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql# Enable to use MySQL 5.6[mysql56-community]name=MySQL 5.6 Community Serverbaseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/enabled=0gpgcheck=1gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

3.安裝mysql-5.5

 yum install mysql-community-client mysql-community-devel mysql-community-server php-mysql

4.調整配置

編輯 /etc/my.cnf 檔案

innodb_file_per_table=1 設定InnoDB為獨立資料表空間模式,每個資料庫的每個表都會產生一個資料目錄innodb_buffer_pool_size= 預設值:128M,設定為作業系統記憶體的70%-80%最佳

本文永久更新連結地址:

相關文章

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.