Before upgrading, first backup the entire database, prepared
Backing up the database, upgrading MySQL usually does not lose data, but for the sake of insurance, we need to do this step. Enter the command:
Mkdir/software Create a folder to store backup files
Mysqldump-u root-p--all-databases--default-character-set=utf8 >/software/databases.sql
To stop the MySQL service, enter the command:
Service Mysqld Stop
Download and install the latest RPM file
RPM-UVH http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
To install MySQL, enter the command:
Yum Install Mysql-community-server
To start MySQL, enter the command:
Service mysqld Start
When the boot is complete, enter the command to view the MySQL version number:
Mysql-v
Upgrade successful
If you are interested in this, please scan the QR code below for free for more details
Linux/centos mysql5.1 Upgrade to 5.6 (RPM-Installed MySQL upgrade)