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

Migrate your EOL MySQL servers to HA Complaint GR Cluster / InnoDB Cluster With Zero Downtime

  • 1.
    Migrate Your EOLMySQL Servers February 13th, 2021 Mydbops MyWebinar - 2 Vinoth Kanna R S Co-Founder, Mydbops
  • 2.
    o Interested inOpen 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
  • 3.
    Mydbops Services Consulting Services Managed Services Focuses onMySQL, MongoDB, PostgreSQL Targeted Engagement 24 x 7 DBA Team
  • 4.
    400 + ClientsIn 4 Yrs. of Operations Our Clients
  • 5.
    Agenda EOL Announcements Version ToUpgrade Zero Downtime Migration Upgrade Path
  • 6.
  • 7.
    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.
  • 8.
    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.
  • 9.
    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
  • 10.
    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
  • 11.
    Version To Upgrade| Key Considerations Only Supports InnoDB Primary Key Is Must No Query Cache GTID Replication
  • 12.
    Version To Upgrade| Key Considerations ANSI SQL Standards Optimiser Changes Reserved Words mysql_upgrade_cheker
  • 13.
    Upgrade Path To8.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
  • 14.
    Zero Downtime Migration SeamlessData Replication Seamless Application Migration
  • 15.
    Seamless Data Replication Node1 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
  • 16.
    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)
  • 17.
    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
  • 18.
    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. //
  • 19.
    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
  • 20.
    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
  • 21.
    Seamless Application Migration MySQL5.6 Applicatio n Servers Node 1 Node 2 Node 3 MySQL 8 GR Cluster Reads / Writes GTID: ON
  • 22.
    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
  • 23.
    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
  • 24.
    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
  • 25.
    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
  • 26.
    References EOL Announcements:  MySQLLife 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
  • 27.
    Reach Us :Info@mydbops.com Thank You

Editor's Notes

  • #2 Add note to this slide
  • #3 Add note to this slide
  • #4 Add note to this slide
  • #5 Add note to this slide
  • #6 Add note to this slide
  • #7 Add note to this slide
  • #8 Add note to this slide
  • #9 Add note to this slide
  • #10 Add note to this slide
  • #11 Add note to this slide
  • #12 Add note to this slide
  • #13 Add note to this slide
  • #14 Add note to this slide
  • #15 Add note to this slide
  • #16 Add note to this slide
  • #17 Add note to this slide
  • #18 Add note to this slide
  • #19 Add note to this slide
  • #20 Add note to this slide
  • #21 Add note to this slide
  • #22 Add note to this slide
  • #23 Add note to this slide
  • #24 Add note to this slide
  • #25 Add note to this slide
  • #26 Add note to this slide
  • #27 Add note to this slide
  • #28 Add note to this slide