Skip to main content
Migrate Your EOL MySQL
Servers
February 13th, 2021
Mydbops MyWebinar - 2
Vinoth Kanna R S
Co-Founder, Mydbops
o Interested in Open Source technologies
o MySQL, MongoDB Certified Professional
o Active MySQL Community Contributor
o Tech Speaker/Blogger
o Past, Technical Services Engineer,
Percona
o Co-Founded, Mydbops IT Solutions, 2016
Vinoth Kanna RS
About Me
Mydbops Services
Consulting
Services
Managed
Services
Focuses on MySQL, MongoDB,
PostgreSQL
Targeted
Engagement
24 x 7
DBA Team
400 + Clients In 4 Yrs. of Operations
Our Clients
Agenda
EOL Announcements
Version To Upgrade
Zero Downtime Migration
Upgrade Path
EOL Announcements | MySQL
EOL Announcements | AWS RDS
MySQL 5.5 (RDS)
 Beyond, December 3, 2020, No new instance can be created
 Starting, February 9, 2021, RDS will automatically upgrade MySQL 5.5 instances to
version 5.7 within the earliest scheduled maintenance window that follows.
 Starting, March 9, 2021, RDS will automatically upgrade any remaining MySQL 5.5
instances to version 5.7 whether or not they are in a maintenance window.
EOL Announcements | AWS RDS
MySQL 5.6 (RDS)
 Beyond, April 1, 2021, No new instance can be created
 Starting, August 3, 2021, RDS will automatically upgrade MySQL 5.6 instances to
version 5.7 within the earliest scheduled maintenance window that follows.
 Starting, September 1, 2021, RDS will automatically upgrade any remaining MySQL
5.6 instances to version 5.7 whether or not they are in a maintenance window.
Version To Upgrade | Why 8.0 ?
 Most feature packed release of MySQL
 Continuous improvements and feature additions on every minor release
 CTE, Window Functions, Improved JSON, Geospatial Functions
 Database Cloning, Last logical import and backup using shell
 InnoDB Replica Sets, GR Improvements
 Binlog Encryption, Better configuration management
 Invisible Columns, Histograms
Version To Upgrade | Why Group Replication / InnoDB
Cluster ?
o MySQL's Native HA Solution
o Synchronous Replication
o Group replication has turned more stable, improved well with 8.0 release
o Tuneable Consistency
o Scale out reads effectively
o Multi Writer Mode
o Built on robust replication framework uses binlogs with GTID for replication
Version To Upgrade | Key Considerations
Only Supports InnoDB
Primary Key Is Must
No Query Cache
GTID Replication
Version To Upgrade | Key Considerations
ANSI SQL Standards
Optimiser Changes
Reserved Words
mysql_upgrade_cheker
Upgrade Path To 8.0
Services (LB)
Stateful Sets
Operator Maturity
PVC / Storage Class
 InPlace Upgrade
 5.5 -> 5.6
 5.6 -> 5.7
 5.7 -> 8.0
 mysql_upgrade to be run after each
of the major version upgrade
 Logical Upgrade
 Most Recommended Way
 Build parallel Environment and
Failover
 Time consuming depending on size
 Replicate Ignoring MySQL DB
Zero Downtime Migration
Seamless Data Replication
Seamless Application Migration
Seamless Data Replication
Node 1
Node 2 Node 3
 GR Cluster Requires GTID to be ON
 To replicate to GR Cluster on 8.0 (GTID ON)
Source Server (5.6) should run with GTID ON.
 To Enable GTID on MySQL 5.6, Downtime is required
Master and all It's Save's have to be applied at same time.
 It's a tedious process where there is too many replicas and
Schedule downtime for entire application.
MySQL 8 GR Cluster
Seamless Data Replication | Case 1: MySQL 5.6 with GTID ON
Node 1
Node 2 Node 3
MySQL 8 GR Cluster
MySQL 5.6
(GTID ON)
Seamless Data Replication | Case 2: MySQL 5.6 with GTID OFF
o If enabling GTID is not a option (due to complexity / no downtime)
o We have to take a different approaches like mirroring traffic, Using
third party replicators to stream the changes to upgraded GR cluster.
o This limitation is broken with the MySQL Version 8.0.23
Seamless Data Replication | Case 2: MySQL 5.6 with GTID OFF
What's New: MySQL 8.0.23
Release Date: 18-01-2021
// Replication channels can now be set to assign a GTID to replicated transactions that do
not already have one, using the ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS
option of the CHANGE REPLICATION SOURCE TO statement.
This feature enables replication from a source that does not use GTID-based replication,
to a replica that does. //
Seamless Data Replication | Case 2: MySQL 5.6 with GTID OFF
Master MySQL 8.0.23
GTID: OFF GTID: ON
Log Slave updates: ON
change replication source to .
. . . . . . . . . . . . . . . . . . . .
assign_gtids_to_anonymous_t
ransactions=LOCAL;
#210212 23:00:42 server id 320
end_log_pos 399 . . . . . Xid =
1245
use `test`/*!*/;
truncate table event_logs
/*!*/;
# at 399
SET @@SESSION.GTID_NEXT= 'bb71f03a-
1ab9-42ba-b3a2-1803de73944f:1224'/*!*/;
#210212 23:00:42 server id 320 Xid = 1245
use `test`/*!*/;
truncate table event_logs
/*!*/;
# at 399
Replicate To
GR Cluster
Seamless Data Replication | Case 2: MySQL 5.6 with GTID OFF
Source
MySQL 8.0.23
MySQL 5.6
GTID: OFF
MySQL 5.7
GTID: OFF GTID: ON
assign_gtids_to_anonymous_
transactions=LOCAL;
</p>
Node 1
Node 2 Node 3
MySQL
8.0.22
GR Cluster
Actual Implementation
Seamless Application Migration
MySQL 5.6
Applicatio
n
Servers
Node 1
Node 2 Node 3
MySQL 8
GR Cluster
Reads / Writes
GTID: ON
Application Migration | Proxy End Points
1
2
3
MySQL Router, ProxySQL, MaxScale, HaProxy etc
Proxy's / Load Balancers
Centralised DNS, Route53 endpoints
DNS Based Routing
Virutal IP Managed With Keepalived, EIP
Virtual IP / EIP Based Routing
Traffic
Routing
Application Migration | Proxy Setup
MySQL 5.6
Applicatio
n
Servers
Node 1
Node 2 Node 3
MySQL 8
GR Cluster
Reads / Writes
Any
Proxy
Service
GTID: ON
Application Migration | Lazy Switch
MySQL 5.6
Applicatio
n
Servers
Node 1
Node 2 Node 3
MySQL 8
GR Cluster
Reads / Writes Any
Proxy
Service
GTID: ON
Application Migration | Failover
MySQL 5.6
Applicatio
n
Servers
Node 1
Node 2 Node 3
MySQL 8
GR Cluster
Reads / Writes Any
Proxy
Service
GTID: ON
References
EOL Announcements:
 MySQL Life Cycle
 AWS RDS MySQL 5.5 Announcement
 AWS RDS MySQL 5.6 Announcement
MySQL 8.0:
 MySQL 8.0 For Database Engineers
 MySQL Shell For Database Engineers
 Wars Of MySQL Cluster
 High Available With InnoDB Cluster
Reach Us : Info@mydbops.com
Thank You