Page 1 of 1

Mysql 5.6 to 5.7 upgrade on Centos 6.7

Posted: Wed Jul 08, 2020 1:54 pm
by gogoi
I solved my upgrade issue with this:

# Make sure yum is up-to-date
yum update yum

# Install yum-utils (it provides yum-config-manager)
yum install yum-utils

# Backup: dump all databases to all_dbs.sql
mysqldump --lock-all-tables --all-databases -uroot -ped8a5f47cbf39f0b5eda6715c85c0ae0 >/root/all_dbs.sql

# Stop MySQL daemon
service mysqld stop

# Download latest MySQL for CentOS 6
wget ... noarch.rpm
sudo rpm -Uvh mysql80-community-release-el6-2.noarch.rpm
yum repolist all | grep mysql
sudo yum-config-manager --enable mysql57-community
sudo yum-config-manager --disable mysql80-community
yum update mysql

# Start MySQL
service mysqld start
# If you get any errors you have to remove deprecated variables in etc/my.cnf

# Upgrade existing databases
mysql_upgrade -uroot -p

Source: ... -centos-6/