Original

Upgrade MySQL on EC2 instance


I upgraded MySQL from 5.5 to 5.7 on an EC2 instance using the following commands:

Stop the server first.

service mysqld stop

Don't forget to backup your DB before the upgrade!

 cp /var/lib/mysql /var/lib/mysql.original

Upgrade.

yum remove mysql55-server
yum install mysql57-server
/etc/init.d/mysqld start
mysql_upgrade

References

[1] How to upgrade Mysql 5.5 to 5.6 without data loss on aws-ec2

[2] Upgrade MySQL to 5.6 on ec2

0
  • By Yuechun Wang
  • Published 2022-01-13
  • The materials on this website may be freely copied and distributed for noncommercial personal use only so long as our copyright notice and website address is included.
  • Comments