標籤:load search my.cnf 5.5 資料 mys conf enabled 安裝
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
要安裝MySQL5.6的可以安裝:
rpm -ivh http://repo.mysql.com/mysql-community-release-el6.rpm最新的yum源可以去http://dev.mysql.com/downloads/repo/yum下載
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%最佳
5、下面這條命令設定開機自啟動,省的我們每次開機就去啟動一下mysql了。
chkconfig --levels 345 mysqld on
原始帳號和密碼 root root
CentOS 6.5通過yum安裝 MySQL-5.5