STEP1: Check whether the system comes with the installation of MySQL
# yum list installed | grep mysql
STEP2: Delete the system's own MySQL and its dependencies
Command:
# yum -y remove mysql-libs.x86_64
STEP3: Add a RPM source to CentOS and select a newer source
Command:
# wget dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm# yum localinstall mysql-community-release-el6-5.noarch.rpm# yum repolist all | grep mysql# yum-config-manager --disable mysql55-community# yum-config-manager --disable mysql56-community# yum-config-manager --enable mysql57-community-dmr# yum repolist enabled | grep mysql
STEP4: Installing the MySQL server
Command:
install mysql-community-server
STEP5: Start MySQL
Command:
# service mysqld start
STEP6: Check if MySQL is self-booting and set on self-boot
Command:
# chkconfig --list | grep mysqld# chkconfig mysqld on
Step7:mysql Security Settings
Command:
# mysql_secure_installation
Refer to the relevant document address:
Http://www.rackspace.com/knowledge_center/article/installing-mysql-server-on-centos
Http://dev.mysql.com/doc/refman/5.7/en/linux-installation-yum-repo.html
Http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html
The most complete version of the CentOS 6.5/6.6 installation MySQL 5.7 tutorial