# First, add the MySQL Yum repository to the repository list system. # In https://dev.mysql.com/downloads/repo/yum/ address, yum Repository download MySQL [root @ alone-MySQL Tools] # wget --no-the Check-HTTPS Certificate: //dev.mysql. com / get / mysql80-community- release-el6-3.noarch.rpm
[root@alone-mysql tools]# rpm -Uvh mysql80-community-release-el6-3.noarch.rpm warning: mysql80-community-release-el6-3.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ########################################### [100%] 1:mysql80-community-relea########################################### [100%]
# View mysql yum repository is already in force which repository is enabled and which are disabled, is enabled by default most current mysql8 [root @ alone-MySQL Tools] # yum repolist Enabled | grep MySQL MySQL-MySQL Connectors Connectors-Community Community Community Community 94 mysql- Community Community Community Community Tools MySQL-Tools 78 mysql55-MySQL 5.5 Community Community Community Community Server 99
# Here we need to disable the default mysql8, enabled MySQL 5.5 [root @ alone-MySQL Tools] # yum-config-Manager --disable mysql80-Community Community [root @ alone-MySQL Tools] # yum-config-Manager - enable mysql55-Community Community # View in force MySQL yum Repository [root @ alone-MySQL Tools] # yum repolist Enabled | grep MySQL MySQL-Connectors-Community Community MySQL Connectors Community Community 94 MySQL-Tools-Community Community MySQL Tools Community Community 78 mysql55-Community Community MySQL Community Community Server 487 5.5 # can also manually for mysql-community.repo file for editing, enabled setting mysql 5.5 to 1, the mysql8.0 is enabled is set to 0 [root @ alone-MySQL Tools] # LS the -l / etc /yum.repos.d/mysql-community.repo -rw-r -. r-- 1 root root 2074 May 26 22:15 /etc/yum.repos.d/mysql-community.repo
# Then use yum install mysql [root @ alone-mysql Tools] # yum -y install mysql-Community Community-Server # start mysql, mysql start to look at when the prompt [root @ alone-mysql tools] # service mysqld start
# Here follow the above tips set about mysql password [root @ alone-mysql tools] # / usr / bin / mysqladmin -u root password 'root' # can now log on our mysql use the new password [root @ alone-mysql tools ] # MySQL-uroot--p the Enter password:
For details see: https: //dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/