CentOS 6.5 installs MySQL-5.5 through yum
1. Install the yum source for mysql-5.5
Rpm-ivh http://repo.mysql.com/yum/mysql-5.5-community/el/6/x86_64/mysql-community-release-el6-5.noarch.rpm
To install MySQL5.6, you can install:
Rpm-ivh http://repo.mysql.com/mysql-community-release-el6.rpm 's latest yum source can be downloaded at http://dev.mysql.com/downloads/repo/yum
two。 Modify the installed yum source
Edit the / etc/yum.repos.d/mysql-community.repo file and change the enabled of 5.5to enabled of 5.5and enabled of 5.6to 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. Install mysql-5.5
Yum install mysql-community-client mysql-community-devel mysql-community-server php-mysql
4. Adjust the configuration
Edit / etc/my.cnf file
Innodb_file_per_table=1 sets InnoDB to independent tablespace mode, and each table in each database generates a data directory innodb_buffer_pool_size= default: 128m, which is best set to 70% of the operating system memory.
5. The following command sets the boot self-boot, which saves us from booting mysql every time we boot.
Chkconfig-levels 345 mysqld on
Original account number and password root root