SlideShare uma empresa Scribd logo
1 de 31
Baixar para ler offline
Copyright 2016 Severalnines AB
How to upgrade to MySQL 5.7 - best practices
March 15, 2016
Krzysztof Książek
Severalnines
krzysztof@severalnines.com
1
2
Your host & some logistics
I'm Jean-Jérôme from the Severalnines Team
and I'm your host for today's webinar!
Feel free to ask any questions in the
Questions section of this application or via
the Chat box.
You can also contact me directly via the chat
box or via email: jj@severalnines.com
during or after the webinar.
Copyright 2016 Severalnines AB
! Preparing an upgrade - changes between MySQL 5.6 and 5.7
! Information_schema
! SQL modes
! Authentication model
! Testing for upgrade
! Designing test environment
! Building test environment
! Executing tests
! Upgrade process
! Tools which may help you with upgrade process

3
Agenda
Copyright 2016 Severalnines AB
Why upgrading to MySQL 5.7?
4
Copyright 2016 Severalnines AB
! Better performance
! New features
! Multi source replication
! Intra-schema parallel replication
! Online buffer pool resize!!!
! Improved optimizer cost model
! Access to security and bugfix releases
! 5.5 ended its ‘Premier’ support, ‘Extended’ will end in 2018

5
Why upgrading to MySQL 5.7?
Copyright 2016 Severalnines AB
Preparing an upgrade - reviewing
changes
6
Copyright 2016 Severalnines AB
! Information schema changes
! global_status, session_status, global_variables and
session_variables moved to the performance_schema
! You can restore the original behavior by setting:

SET GLOBAL show_compatibility_56=1
! This may affect different monitoring solutions
7
Preparing an upgrade - reviewing changes
Copyright 2016 Severalnines AB
! SQL mode changes
! STRICT_TRANS_TABLES mode is used by default
! No more inserting of invalid data like zeroed date or
skipping column in INSERT when column doesn’t have
explicit DEFAULT value
! This may cause issues if application relies on previous
(definitely not so good) defaults
8
Preparing an upgrade - reviewing changes
Copyright 2016 Severalnines AB
! Authentication model changes
! Pre-4.1 passwords have been removed
! Password expiration has been added
! By default it’s not affecting 5.6 users ( >=5.7.11) but this
default may change in the future (http://
mysqlserverteam.com/an-update-on-
default_password_lifetime)
! You should manually set the desired expiration policy
for every user, after you upgraded to MySQL 5.7
9
Preparing an upgrade - reviewing changes
Copyright 2016 Severalnines AB
! Redo and undo log format changed - use
innodb_fast_shutdown=0 when you stop 5.6 for upgrade
! YEAR(2) format has been removed
! User-defined locks system has changed - multiple locks are now
possible
! ‘derived_merge’ optimizer switch may trigger SQL
incompatibility
! For full list of changes look at: http://dev.mysql.com/doc/
refman/5.7/en/upgrading-from-previous-series.html

10
Preparing an upgrade - reviewing changes
Copyright 2016 Severalnines AB
Testing for upgrade
11
Copyright 2016 Severalnines AB
Testing for upgrade
12
Copyright 2016 Severalnines AB
! First step - design your test environment
! It should be as close to the production as possible
! Weaker hardware will lead to incorrect results
! Queries may be slower on weaker CPU and I/O
subsystem
! or you will not catch a real regression - thinking it’s the
hardware’s fault
13
Testing for upgrade
Copyright 2016 Severalnines AB
! Dataset should be as close to the real data as possible
! Scrubbing dataset or cleaning confidential data may
impact query execution plans - if you don’t have to,
don’t clean your data
! You should be using real-world queries to test the
performance
! Ideally, use your application for testing the logic and
making sure all processes work as expected.
14
Testing for upgrade
Copyright 2016 Severalnines AB
! Simplest way of building a test environment:
! create a slave from production master
! and then cut off replication
! Once we have 5.6 node with current dataset, we need to
create another 5.6 node with a copy of this data
! Finally, we want to upgrade one of them to MySQL 5.7
! It’s nice as we can test the upgrade process while
building test hosts
15
Testing for upgrade
Copyright 2016 Severalnines AB
! We have hosts but we need to collect data for tests
! tcpdump or just slow query log would do
! both have some impact on the overall performance
! tcpdump can be executed outside of the database,
to minimize the impact
! You want to collect all the queries - if you have some
processes scheduled to run at a particular time, collect
those queries too when they happen
16
Testing for upgrade
Copyright 2016 Severalnines AB
! Once you have data, you can run some preliminary regression
testing using pt-upgrade
! Run twice, first time using the ‘—save-results’ flag - it’ll save your time
! Generate report, investigate any reported issues
! pt-upgrade compares performance and result set
! Make sure you execute tests locally on the hosts, network latency
may cause some impact
! Make sure both nodes are in the same state - cold or warmed up in
exactly the same way
17
Testing for upgrade
Copyright 2016 Severalnines AB
! pt-upgrade is not enough to cover all issues - yes, it’ll
check performance and some obvious issues but you
need to run more detailed tests
! If you have a set of acceptance tests you use to test new
releases (you should have them), you can use those tests
to check if upgrade affected core functions of your app
! Test application logic, make sure all operations work
correctly, check all of the processes and APIs you may
have in your app
18
Testing for upgrade
Copyright 2016 Severalnines AB
! Once you have completed your tests, there's one more
thing to check
! Rebuild your 5.7 node
! provision it again
! run mysql_upgrade, as you did earlier
! set it up as a slave
! Allow it to work as a slave for couple of days - it’ll confirm
replication works fine between old and new versions
19
Testing for upgrade
Copyright 2016 Severalnines AB
Upgrade process
20
Copyright 2016 Severalnines AB
! Start with a single slave and upgrade it:
! Disable innodb_fast_shutdown
! Shut down MySQL
! Upgrade binaries to MySQL 5.7
! Start MySQL
! Run mysql_upgrade
! Restart MySQL
! Make sure replication is working and if
needed, fix it

21
Upgrade process
Copyright 2016 Severalnines AB
! Before upgrade - make sure you took the node out of
rotation in a proxy layer or in your application
! After upgrade - if possible, put some limited traffic on the
new host
! Observe how it behaves under real-world traffic
! CPU
! I/O
! Memory utilization
22
Upgrade process
Copyright 2016 Severalnines AB
! Step by step increase the load to a normal level
! If everything is ok, proceed with upgrade on remaining
slaves
! Once all of the slaves are upgraded, pick one of them as
a new master
! Set it in a master-master replication with current, 5.6
master
23
Upgrade process
Copyright 2016 Severalnines AB
! Perform a switchover to the new master
! If the old master keeps replicating, that’s great - upgrade it in a
regular way
! If the old master replication breaks (i.e. incompatibilities in
binlog format between old and new MySQL versions), rebuild it:
! Wipe the data
! Perform binary upgrade to MySQL 5.7
! Provision the data from slave and set up the replication

24
Upgrade process
Copyright 2016 Severalnines AB
Tools which may help you with upgrade
process
25
Copyright 2016 Severalnines AB
! tcpdump
! tcpdump -s 65535 -x -nn -q -tttt -i any port 3306 >
mysql.tcp.txt
! Helps you to collect queries exchanged between
application hosts and database server
! Minimizes the impact caused by data collection (when
executed outside of database node)
26
Tools which may help you with upgrade process
Copyright 2016 Severalnines AB
! pt-upgrade, Percona Playback
! pt-upgrade is designed to check for
performance and basic result set
regressions
! Points you to queries which are not
performing on the new version or they
return different data
! Percona Playback is designed for load
testing - replays slow log, trying to
simulate real-world workload
27
Tools which may help you with upgrade process
Copyright 2016 Severalnines AB
! MaxScale and ProxySQL
! Database-aware proxies help you through the
upgrade process
! They route the traffic off the node when it goes
down
! Help you with a warm-up period - use lower weight
for new hosts to allow them to warm up properly
! ProxySQL can handle graceful switchover when
used with external tool (for example,
mysqlrpladmin, MHA or ClusterControl)

28
Tools which may help you with upgrade process
Copyright 2016 Severalnines AB
! mysqlrpladmin, MHA
! Those tools can perform a switchover for you
! No need to make the changes in manual and error prone
way - just run a script
! Those tools can be integrated with ProxySQL for graceful
switchovers
29
Tools which may help you with upgrade process
Copyright 2016 Severalnines AB
! ClusterControl
! Helps with provisioning of new
nodes
! Perform a switchover for you
! Gives you clear insight into
replication status
! Gives you clear insight into all
database operations
30
Tools which may help you with upgrade process
Copyright 2015 Severalnines AB
! More blogs covering different aspects of MySQL operations:
! http://severalnines.com/blog-categories/db-ops
! An ebook focused on upgrade process to MySQL 5.7 will become
available soon
! Step-by-step guide through each part of the process
! Detailed explanations of different issues you may run into
! We’ll be at Percona Live in April, see you there!
! Contact: jj@severalnines.com

31
Thank You!

Mais conteúdo relacionado

Mais de Severalnines

Cloud's future runs through Sovereign DBaaS
Cloud's future runs through Sovereign DBaaSCloud's future runs through Sovereign DBaaS
Cloud's future runs through Sovereign DBaaSSeveralnines
 
Tips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudTips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudSeveralnines
 
Working with the Moodle Database: The Basics
Working with the Moodle Database: The BasicsWorking with the Moodle Database: The Basics
Working with the Moodle Database: The BasicsSeveralnines
 
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDBSysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDBSeveralnines
 
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...Severalnines
 
Webinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDBWebinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDBSeveralnines
 
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControlWebinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControlSeveralnines
 
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...Severalnines
 
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...Severalnines
 
Disaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDBDisaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDBSeveralnines
 
MariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseMariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseSeveralnines
 
Performance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBPerformance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBSeveralnines
 
Advanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona ServerAdvanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona ServerSeveralnines
 
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket KnifePolyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket KnifeSeveralnines
 
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...Severalnines
 
Webinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQLWebinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQLSeveralnines
 
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance TuningWebinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance TuningSeveralnines
 
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDBWebinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDBSeveralnines
 
Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?Severalnines
 
Webinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High AvailabilityWebinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High AvailabilitySeveralnines
 

Mais de Severalnines (20)

Cloud's future runs through Sovereign DBaaS
Cloud's future runs through Sovereign DBaaSCloud's future runs through Sovereign DBaaS
Cloud's future runs through Sovereign DBaaS
 
Tips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudTips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloud
 
Working with the Moodle Database: The Basics
Working with the Moodle Database: The BasicsWorking with the Moodle Database: The Basics
Working with the Moodle Database: The Basics
 
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDBSysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
 
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
 
Webinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDBWebinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDB
 
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControlWebinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControl
 
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
 
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
 
Disaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDBDisaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDB
 
MariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseMariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash Course
 
Performance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBPerformance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDB
 
Advanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona ServerAdvanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona Server
 
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket KnifePolyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
 
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
 
Webinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQLWebinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQL
 
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance TuningWebinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
 
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDBWebinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
 
Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?
 
Webinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High AvailabilityWebinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High Availability
 

Último

Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftAanSulistiyo
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtrahman018755
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)Delhi Call girls
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdfMatthew Sinclair
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"growthgrids
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrHenryBriggs2
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445ruhi
 
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...SUHANI PANDEY
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfJOHNBEBONYAP1
 
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...SUHANI PANDEY
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...Neha Pandey
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...kajalverma014
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋nirzagarg
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdfMatthew Sinclair
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...SUHANI PANDEY
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...tanu pandey
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 

Último (20)

Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
 

Webinar slides: How To Upgrade to MySQL 5.7 - The Best Practices

  • 1. Copyright 2016 Severalnines AB How to upgrade to MySQL 5.7 - best practices March 15, 2016 Krzysztof Książek Severalnines krzysztof@severalnines.com 1
  • 2. 2 Your host & some logistics I'm Jean-Jérôme from the Severalnines Team and I'm your host for today's webinar! Feel free to ask any questions in the Questions section of this application or via the Chat box. You can also contact me directly via the chat box or via email: jj@severalnines.com during or after the webinar.
  • 3. Copyright 2016 Severalnines AB ! Preparing an upgrade - changes between MySQL 5.6 and 5.7 ! Information_schema ! SQL modes ! Authentication model ! Testing for upgrade ! Designing test environment ! Building test environment ! Executing tests ! Upgrade process ! Tools which may help you with upgrade process
 3 Agenda
  • 4. Copyright 2016 Severalnines AB Why upgrading to MySQL 5.7? 4
  • 5. Copyright 2016 Severalnines AB ! Better performance ! New features ! Multi source replication ! Intra-schema parallel replication ! Online buffer pool resize!!! ! Improved optimizer cost model ! Access to security and bugfix releases ! 5.5 ended its ‘Premier’ support, ‘Extended’ will end in 2018
 5 Why upgrading to MySQL 5.7?
  • 6. Copyright 2016 Severalnines AB Preparing an upgrade - reviewing changes 6
  • 7. Copyright 2016 Severalnines AB ! Information schema changes ! global_status, session_status, global_variables and session_variables moved to the performance_schema ! You can restore the original behavior by setting:
 SET GLOBAL show_compatibility_56=1 ! This may affect different monitoring solutions 7 Preparing an upgrade - reviewing changes
  • 8. Copyright 2016 Severalnines AB ! SQL mode changes ! STRICT_TRANS_TABLES mode is used by default ! No more inserting of invalid data like zeroed date or skipping column in INSERT when column doesn’t have explicit DEFAULT value ! This may cause issues if application relies on previous (definitely not so good) defaults 8 Preparing an upgrade - reviewing changes
  • 9. Copyright 2016 Severalnines AB ! Authentication model changes ! Pre-4.1 passwords have been removed ! Password expiration has been added ! By default it’s not affecting 5.6 users ( >=5.7.11) but this default may change in the future (http:// mysqlserverteam.com/an-update-on- default_password_lifetime) ! You should manually set the desired expiration policy for every user, after you upgraded to MySQL 5.7 9 Preparing an upgrade - reviewing changes
  • 10. Copyright 2016 Severalnines AB ! Redo and undo log format changed - use innodb_fast_shutdown=0 when you stop 5.6 for upgrade ! YEAR(2) format has been removed ! User-defined locks system has changed - multiple locks are now possible ! ‘derived_merge’ optimizer switch may trigger SQL incompatibility ! For full list of changes look at: http://dev.mysql.com/doc/ refman/5.7/en/upgrading-from-previous-series.html
 10 Preparing an upgrade - reviewing changes
  • 11. Copyright 2016 Severalnines AB Testing for upgrade 11
  • 12. Copyright 2016 Severalnines AB Testing for upgrade 12
  • 13. Copyright 2016 Severalnines AB ! First step - design your test environment ! It should be as close to the production as possible ! Weaker hardware will lead to incorrect results ! Queries may be slower on weaker CPU and I/O subsystem ! or you will not catch a real regression - thinking it’s the hardware’s fault 13 Testing for upgrade
  • 14. Copyright 2016 Severalnines AB ! Dataset should be as close to the real data as possible ! Scrubbing dataset or cleaning confidential data may impact query execution plans - if you don’t have to, don’t clean your data ! You should be using real-world queries to test the performance ! Ideally, use your application for testing the logic and making sure all processes work as expected. 14 Testing for upgrade
  • 15. Copyright 2016 Severalnines AB ! Simplest way of building a test environment: ! create a slave from production master ! and then cut off replication ! Once we have 5.6 node with current dataset, we need to create another 5.6 node with a copy of this data ! Finally, we want to upgrade one of them to MySQL 5.7 ! It’s nice as we can test the upgrade process while building test hosts 15 Testing for upgrade
  • 16. Copyright 2016 Severalnines AB ! We have hosts but we need to collect data for tests ! tcpdump or just slow query log would do ! both have some impact on the overall performance ! tcpdump can be executed outside of the database, to minimize the impact ! You want to collect all the queries - if you have some processes scheduled to run at a particular time, collect those queries too when they happen 16 Testing for upgrade
  • 17. Copyright 2016 Severalnines AB ! Once you have data, you can run some preliminary regression testing using pt-upgrade ! Run twice, first time using the ‘—save-results’ flag - it’ll save your time ! Generate report, investigate any reported issues ! pt-upgrade compares performance and result set ! Make sure you execute tests locally on the hosts, network latency may cause some impact ! Make sure both nodes are in the same state - cold or warmed up in exactly the same way 17 Testing for upgrade
  • 18. Copyright 2016 Severalnines AB ! pt-upgrade is not enough to cover all issues - yes, it’ll check performance and some obvious issues but you need to run more detailed tests ! If you have a set of acceptance tests you use to test new releases (you should have them), you can use those tests to check if upgrade affected core functions of your app ! Test application logic, make sure all operations work correctly, check all of the processes and APIs you may have in your app 18 Testing for upgrade
  • 19. Copyright 2016 Severalnines AB ! Once you have completed your tests, there's one more thing to check ! Rebuild your 5.7 node ! provision it again ! run mysql_upgrade, as you did earlier ! set it up as a slave ! Allow it to work as a slave for couple of days - it’ll confirm replication works fine between old and new versions 19 Testing for upgrade
  • 20. Copyright 2016 Severalnines AB Upgrade process 20
  • 21. Copyright 2016 Severalnines AB ! Start with a single slave and upgrade it: ! Disable innodb_fast_shutdown ! Shut down MySQL ! Upgrade binaries to MySQL 5.7 ! Start MySQL ! Run mysql_upgrade ! Restart MySQL ! Make sure replication is working and if needed, fix it
 21 Upgrade process
  • 22. Copyright 2016 Severalnines AB ! Before upgrade - make sure you took the node out of rotation in a proxy layer or in your application ! After upgrade - if possible, put some limited traffic on the new host ! Observe how it behaves under real-world traffic ! CPU ! I/O ! Memory utilization 22 Upgrade process
  • 23. Copyright 2016 Severalnines AB ! Step by step increase the load to a normal level ! If everything is ok, proceed with upgrade on remaining slaves ! Once all of the slaves are upgraded, pick one of them as a new master ! Set it in a master-master replication with current, 5.6 master 23 Upgrade process
  • 24. Copyright 2016 Severalnines AB ! Perform a switchover to the new master ! If the old master keeps replicating, that’s great - upgrade it in a regular way ! If the old master replication breaks (i.e. incompatibilities in binlog format between old and new MySQL versions), rebuild it: ! Wipe the data ! Perform binary upgrade to MySQL 5.7 ! Provision the data from slave and set up the replication
 24 Upgrade process
  • 25. Copyright 2016 Severalnines AB Tools which may help you with upgrade process 25
  • 26. Copyright 2016 Severalnines AB ! tcpdump ! tcpdump -s 65535 -x -nn -q -tttt -i any port 3306 > mysql.tcp.txt ! Helps you to collect queries exchanged between application hosts and database server ! Minimizes the impact caused by data collection (when executed outside of database node) 26 Tools which may help you with upgrade process
  • 27. Copyright 2016 Severalnines AB ! pt-upgrade, Percona Playback ! pt-upgrade is designed to check for performance and basic result set regressions ! Points you to queries which are not performing on the new version or they return different data ! Percona Playback is designed for load testing - replays slow log, trying to simulate real-world workload 27 Tools which may help you with upgrade process
  • 28. Copyright 2016 Severalnines AB ! MaxScale and ProxySQL ! Database-aware proxies help you through the upgrade process ! They route the traffic off the node when it goes down ! Help you with a warm-up period - use lower weight for new hosts to allow them to warm up properly ! ProxySQL can handle graceful switchover when used with external tool (for example, mysqlrpladmin, MHA or ClusterControl)
 28 Tools which may help you with upgrade process
  • 29. Copyright 2016 Severalnines AB ! mysqlrpladmin, MHA ! Those tools can perform a switchover for you ! No need to make the changes in manual and error prone way - just run a script ! Those tools can be integrated with ProxySQL for graceful switchovers 29 Tools which may help you with upgrade process
  • 30. Copyright 2016 Severalnines AB ! ClusterControl ! Helps with provisioning of new nodes ! Perform a switchover for you ! Gives you clear insight into replication status ! Gives you clear insight into all database operations 30 Tools which may help you with upgrade process
  • 31. Copyright 2015 Severalnines AB ! More blogs covering different aspects of MySQL operations: ! http://severalnines.com/blog-categories/db-ops ! An ebook focused on upgrade process to MySQL 5.7 will become available soon ! Step-by-step guide through each part of the process ! Detailed explanations of different issues you may run into ! We’ll be at Percona Live in April, see you there! ! Contact: jj@severalnines.com
 31 Thank You!