InsideDarkWeb.com

How to upgrade Mysql 5.5 to 5.6 without data loss on aws-ec2?

MySQL server (5.5) is running on aws-ec2 instance with following linux details

NAME="Amazon Linux AMI"
VERSION="2015.09"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2015.09"
PRETTY_NAME="Amazon Linux AMI 2015.09"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2015.09:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"

Since Django 2.2 doesn’t support Mysql 5.5
https://docs.djangoproject.com/en/2.2/ref/databases/#mysql-notes
. I want to upgrade MSQL to 5.6 .

  • We don’t have backup server and we don’t want new server .
  • Creating sql dump , removing MySQL 5.5 then installing MySQL 5.6 and importing dump will it work ? Since server has 100 GB of data importing the dump will be a long process and we will have considerable amount of downtime .There can be some issue with data while importing dump in 5.6 .

Is there a way to upgrade MySQL without data loss and less downtime ?

Database Administrators Asked by Palash Jadhav on November 11, 2021

1 Answers

One Answer

You don't need to dump and import the databases, a copy of the folder /var/lib/mysql should be ok for backup.

I suggest you upgrade to MySQL 5.7 as its the currently supported release and has better performance,

here are the steps, I implemented it many times with no issues

1. # service mysql stop
  1. backup your databases before the upgrade

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

  2. Download the MySQL 5.7 RPM

    $ wget http://repo.mysql.com/mysql57-community-release-el7.rpm -P /tmp/

  3. Remove the MySQL-Community RPM that contains MySQL 5.5

    $ yum remove mysql-community-release

  4. Install the MySQL 5.7 RPM

    $ rpm -ivh /tmp/mysql57-community-release-el7.rpm

  5. Update the MySQL Repository to 5.7

    $ yum update mysql

  6. Let MySQL know that it received an upgrade

    service mysql start

    mysql_upgrade

Answered by AWS PS on November 11, 2021

Add your own answers!

Related Questions

Performance issue in Postgresql 12

0  Asked on December 3, 2020 by raghu-mutyam

   

Linked Server throws metadata error

1  Asked on November 30, 2020 by cam

     

What is an ODBK file and how to restore that?

1  Asked on November 14, 2020 by hasnain

   

Calculating percentage over sub query SQL

1  Asked on October 29, 2020 by patrick-kusebauch

   

How to select the rows affected by an update

2  Asked on October 27, 2020 by enharmonic

 

Corruption in mariadb binlog

2  Asked on October 18, 2020 by ctutte

     

“SQL command not properly ended” with trigger

1  Asked on September 28, 2020 by exilevoid

     

Install mysql through deb file on ubuntu 20.04

1  Asked on September 13, 2020 by ajeetkumar

       

Indexes not used for join

1  Asked on September 11, 2020 by dmitriy-grankin

     

Ask a Question

Get help from others!

© 2021 InsideDarkWeb.com. All rights reserved.