SlideShare a Scribd company logo
1 of 35
Download to read offline
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Upgrade from MySQL 5.7 to MySQL 8.0
Olivier Dasini
MySQL Principal Solutions Architect EMEA
olivier.dasini@oracle.com
Twitter : @freshdaz
Blog : http://dasini.net/blog
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is
intended for information purposes only, and may not be incorporated
into any contract. It is not a commitment to deliver any material, code,
or functionality, and should not be relied upon in making purchasing
decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole
discretion of Oracle.
2
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Me, Myself & I
➢
MySQL Geek
✔ Addicted to MySQL for 15+ years!
✔ Playing with databases for 20+ years
➢
MySQL Writer, Blogger and Speaker
✔ Also former : DBA, Consultant, Architect, Trainer, ...
➢
MySQL Principal Solutions Architect EMEA at Oracle
➢
Stay tuned! :
✔ Twitter : @freshdaz
✔ Blog : http://dasini.net/blog
3
Olivier DASINI
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Why upgrade?
• New features
– MySQL JSON Document Store, CTE, Window Functions, JSON, GIS, …
• Security improvements
– New Authentication Plugin, SQL Roles, Undo/Redo & Tablespaces Encryption, …
• Performance/Scalability improvements
– Cost Model, Histograms, P_S, I_S, Scaling R/W workloads, Resource Groups, …
• Manageability
– Set Persist, Invisible Indexes, Restart command, Instant Add Column, …
• Reduce tech debt for the MySQL installation
• Stay on fully supported release
• …
4
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Support Life Cycle
Release GA Date Premier Support End Extended Support End Sustaining Support End
MySQL 5.0 Oct 2005 Dec 2011 N/A Indefinite
MySQL 5.1 Dec 2008 Dec 2013 N/A Indefinite
MySQL 5.5 Dec 2010 Dec 2015 Dec 2018 Indefinite
MySQL 5.6 Feb 2013 Feb 2018 Feb 2021 Indefinite
MySQL 5.7 Oct 2015 Oct 2020 Oct 2023 Indefinite
MySQL 8.0 Apr 2018 Apr 2023 Feb 2026 Indefinite
5
http://www.oracle.com/us/support/library/lifetime-support-technology-069183.pdf
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Why upgrade? - MySQL 8.0 Security improvement
6
• SSL enabled by default
• Force root password during install
• Stronger passwords
• New Authentication Plugin
• MySQL Enterprise Edition:
– MySQL Audit
– MySQL Monitor
– MySQL Backup
– MySQL Firewall
– MySQL Encryption
– MySQL Transparent Data Encryption
– MySQL Data Masking and De-identification
– MySQL Thread Pool
• https://dev.mysql.com/doc/mysql-security-excerpt/8.0/en/
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
7
OS : Oracle Linux 7.4
CPU : 48cores-HT Intel Skylake 2.7Ghz
(2CPU sockets, Intel(R) Xeon(R) Platinum 8168 CPU)
RAM: 256GB
Storage : x2 Intel Optane flash devices
(Intel (R) Optane (TM) SSD P4800X Series)
MySQL 8.0 Sysbench Benchmark
Why upgrade? - Better performance: Reads & Writes
OS : Oracle Linux 7.4
CPU : 48cores-HT Intel Skylake 2.7Ghz
(2CPU sockets, Intel(R) Xeon(R) Platinum 8168 CPU)
RAM: 256GB
Storage : x2 Intel Optane flash devices
(Intel (R) Optane (TM) SSD P4800X Series)
IO Bound Read Only (Point Selects) Read Write (update nokey)
http://dimitrik.free.fr/blog/posts/mysql-performance-1m-iobound-qps-with-80-ga-on-intel-optane-ssd.html
http://dimitrik.free.fr/blog/posts/mysql-performance-80-and-sysbench-oltp_rw-updatenokey.html
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL Upgrade – Supported Paths
• All minor upgrades like 5.7.21 to 5.7.22 or doing a jump like 5.7.20 to 5.7.24
is supported
• Upgrading one major (5.6 - 5.7) release level is supported
– It’s recommended upgrading to the latest 5.6 release before moving to 5.7
• Doing long-jumps (5.1 – 5.7) is supported if you upgrade one release level at a
time
– 5.1 → 5.5 → 5.6 → 5.7 → 8.0
• Direct upgrades that skip a release level (for example, upgrading directly from
MySQL 5.5 to 8.0) is not recommended
• Yon can not upgrade from DMR to GA
8
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Overview of MySQL 8.0 features
• What’s New in MySQL 8.0? (Generally Available)
– https://mysqlserverteam.com/whats-new-in-mysql-8-0-generally-available/
• Changes in MySQL 8.0.11 (General Availability)
– https://mysqlserverteam.com/changes-in-mysql-8-0-11-general-availability/
• The MySQL 8.0.12 Maintenance Release is Generally Available
– https://mysqlserverteam.com/the-mysql-8-0-12-maintenance-release-is-generally-available/
• The MySQL 8.0.13 Maintenance Release is Generally Available
– https://mysqlserverteam.com/the-mysql-8-0-13-maintenance-release-is-generally-available/
9
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL 8.0 Deprecation/Removals - Samples
• Features removed
– Query Cache, Non-native partitioning, ...
• Options and variables removed
– Log_errors/log_warnings replaced by log_error_verbosity
– SQL Modes removed
– ...
• Account management
– The PASSWORD() function has been removed, using GRANT to create users is no longer
supported
• Syntaxes affected
– EXTENDED and PARTITIONS keywords for EXPLAIN removed
– N as a synonym for NULL in SQL removed. Use NULL instead
10
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL 8.0 Defaults Changes - Samples
• There are a lot of changes to the defaults in 8.0, see
– https://mysqlserverteam.com/new-defaults-in-mysql-8-0/
• Some important ones:
– Default character set and collation to utf8mb4 and utf8mb4_0900_ai_ci
– The default/preferred authentication plugin caching_sha2_password
– innodb_undo_tablespaces changed from 0 to 2
– log_bin has been changed from OFF to ON
11
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
New Servers Default’s in MySQL 8.0
• charset_set_server=utf8mb4
• collation_server=utf8mb4_0900_ai_ci
• validate_password_check_user_name=ON
• event_scheduler=ON
• log_bin=ON
• server_id=1
• log-slave-updates=ON
• expire_log_days=30
• master-info-repository=TABLE
• relay-log-info-repository=TABLE
• transaction-write-set-extraction=XXHASH64
• … and many more, see link below for more details
12
https://mysqlserverteam.com/new-defaults-in-mysql-8-0/
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL Upgrade – Before you start!
• Review "Changes in MySQL 8.0" for changes that may require action before
upgrading
– https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html
• Review "What Is New in MySQL 8.0" for deprecated and removed features.
– https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html
• Review "Server and Status Variables and Options Added, Deprecated, or
Removed in MySQL 8.0".
– If you use deprecated or removed variables, an upgrade may require configuration changes.
– https://dev.mysql.com/doc/refman/8.0/en/added-deprecated-removed.html
• Review "Release Notes" for information about fixes, changes, and new features.
– https://dev.mysql.com/doc/relnotes/mysql/8.0/en/
• Create a plan for your upgrade/downgrade path
13
https://dev.mysql.com/doc/refman/8.0/en/upgrade-before-you-begin.html
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Before you Upgrade – Backups of Your Data!
• Database upgrading is very serious work!
– So backup your data!
• Plan for the worst - Paranoia is not always a bad things
– So backup your data!
• Use your favorite backup tool
– MySQL Enterprise Backup
– mysqldump
– …
• Double check your backups
• Test your Restore procedure
14
Credit: https://tricyclefish.com/wp-content/uploads/2016/01/back-up1.jpg
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Is your MySQL server instance ready for upgrade?
15
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Is your MySQL server instance ready for upgrade?
17
• Preliminary checks...
1. Usage of old temporal type?
2. Conflicting db object names and reserved keywords?
3. Usage of utf8mb3 charset?
4. Reserved tablenames in mysql schema?
5. FK names longer than 64 chars?
6. Usage of obsolete sql_mode?
7. ENUM/SET column definitions containing elements longer than 255 characters?
8. Usage of partitioned tables in shared tablespaces?
9. Usage of removed functions?
10.Usage of removed GROUP BY ASC/DESC?
11.Issues reported by ”check table x for upgrade” command?
– ...
https://dev.mysql.com/doc/refman/8.0/en/upgrade-prerequisites.html
Credit: https://emojiisland.com/products/omg-face-emoji-icon
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Upgrade Checker Utility
18
Credit: https://emojiisland.com/products/thumbs-up-hand-sign-emoji-icon
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Upgrade Checker Utility - checkForServerUpgrade
19
• New tool in MySQL Shell
– JS> util.checkForServerUpgrade()
• Will check your MySQL 5.7 or 8.0 installation readiness for upgrade
– Check for legacy issues
– Running the tool on the 5.7 installation, users can make changes when time
permits before the upgrade
• It is in active development and more checks will be added
– Part of MySQL update releases
mysqlsh -- util check-for-server-upgrade { --user=root --host=172.25.0.10 }
mysqlsh -e "util.checkForServerUpgrade({user:'root', host:'172.25.0.10'})"
MYSQL JS> util.checkForServerUpgrade("root@172.25.0.10", {outputFormat:'JSON'})
Examples:
https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-utilities-upgrade.html
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Upgrade Checker Utility - checkForServerUpgrade
20
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Your MySQL server instance is ready for upgrade!
21
o/
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Wait!!!
22
:-0
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Before you Upgrade – Backups of Your Data!
Did I mention BACKUP?
23
;-)
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
In-place Upgrade
24
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL Upgrade – In-place Upgrade
1. Do all necessary preparations/plans/upgrade checker as explained earlier
– e.g. mysqlsh -- util check-for-server-upgrade { --user=root --host=172.25.0.10 }
2. Create a backup of your database (data, logs, config files)
3. Do a graceful shutdown of MySQL (innodb_fast_shutdown=0)
4. Install MySQL 8.0, replace the old binaries with the new ones
5. Start new MySQL 8.0 Server using new binaries and new my.cnf
6. Run mysql_upgrade
– mysql_upgrade examines all tables in all databases for incompatibilities with the current version of
MySQL.
– mysql_upgrade also upgrades the system tables so that you can take advantage of new privileges or
capabilities.
7. Restart the server and look at messages in the error log
8. Verify that apps and services are working as expected
25
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Caching SHA-2 Pluggable Authentication
26
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
caching_sha2_password
27
• caching_sha2_password : new default Authentication plugin in 8.0
– Requires password exchange using a secure connection
●
TCP using TLS/SSL credentials,
●
a Unix socket file, or shared memory,
●
or an unencrypted connection that supports password exchange using an
RSA key pair
– Then cached a copy of the password hash in memory
– MySQL 5.7 default is mysql_native_password
●
Relies on SHA1 algorithm and NIST has suggested to stop using it
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
caching_sha2_password
28
• New users created in MySQL 8.0 will use the
caching_sha2_password as their authentication plugin
– User accounts already created in existing instances are not altered
as a part of an upgrade
ALTER USER 'daz'@'localhost'
IDENTIFIED WITH caching_sha2_password
BY 'password';
Examples: Existing users who wish to switch to caching_sha2_password
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
caching_sha2_password - Issues
29
• If you encounter compatibility issues after upgrading to MySQL 8.0 the
simplest way to address those issues is to reconfigure the server to
revert to the previous default authentication plugin,
mysql_native_password :
Examples:
[mysqld]
default_authentication_plugin=mysql_native_password
• This setting should be viewed as temporary, not as a long term or
permanent solution
https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password
https://mysqlserverteam.com/mysql-8-0-4-new-default-authentication-plugin-caching_sha2_password/
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Keep in mind
30
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL Upgrade – Keep in mind!
• Performance/Scalability monitoring and testing
– Consider MySQL Enterprise Monitor 8.0
• Do you need to consider replication between different versions
– Primary:5.7 → Replica: 8.0
• Changes in default values
• Statements creating warnings/errors
• New optimizer features causing query plan changes
• Monitor resource usage (iostat, top, vmstat etc)
• Upgrade connectors as well
• Backup/Restore processes are your best insurance
31
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL Upgrade – Recap
• Prepare your upgrade (release notes, resources)
• DO run the Upgrade Checker Utility
–Fix issues until it runs clean
• TEST your applications on MySQL 8.0
• DO your backup
• Upgrade to MySQL 8.0
• Enjoy! :)
32
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL Upgrade Resources
• https://dev.mysql.com/doc/refman/8.0/en/upgrading-strategies.html#upgrade-prerequisites
• https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html
• https://mysqlserverteam.com/inplace-upgrade-from-mysql-5-7-to-mysql-8-0/
• https://mysqlserverteam.com/upgrading-to-mysql-8-0-here-is-what-you-need-to-know/
• https://mysqlserverteam.com/mysql-shell-8-0-4-introducing-upgrade-checker-utility/
• https://mysqlserverteam.com/upgrading-to-mysql-8-0-with-spatial-data/
• https://mysqlserverteam.com/whats-new-in-mysql-8-0-generally-available/
• https://mysqlserverteam.com/upgrading-your-mysql-server-farm/
• https://mysqlserverteam.com/mysql-8-0-collations-migrating-from-older-collations/
• https://mysqlserverteam.com/new-defaults-in-mysql-8-0/
33
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL Resources
34
• MySQL Server Team Blog
– http://mysqlserverteam.com/
• MySQL High Availability Blog
– http://mysqlhighavailability.com/
• MySQL Release Engineering Blog
– https://mysqlrelease.com/
• MySQL Dev Team Blog
– https://insidemysql.com/
• MySQL Enterprise Team Blogs
– https://blogs.oracle.com/mysql/
• Lefred’s blog
– https://jefred.be
• Jesper’s blog
– https://mysql.wisborg.dk
• Dimitri’s blog
– http://dimitrik.free.fr/blog/
• Andrew’s blog
– https://thesubtlepath.com/blog/
• Olivier Dasini’s blog
– http://dasini.net/blog/
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Thank you!
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0

More Related Content

What's hot

What's hot (20)

Upgrade to MySQL 5.6 without downtime
Upgrade to MySQL 5.6 without downtimeUpgrade to MySQL 5.6 without downtime
Upgrade to MySQL 5.6 without downtime
 
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLMySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
 
MySQL Shell for DBAs
MySQL Shell for DBAsMySQL Shell for DBAs
MySQL Shell for DBAs
 
Oracle RAC - New Generation
Oracle RAC - New GenerationOracle RAC - New Generation
Oracle RAC - New Generation
 
ProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management OverviewProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management Overview
 
My sql failover test using orchestrator
My sql failover test  using orchestratorMy sql failover test  using orchestrator
My sql failover test using orchestrator
 
MySQL High Availability with Group Replication
MySQL High Availability with Group ReplicationMySQL High Availability with Group Replication
MySQL High Availability with Group Replication
 
Patroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyPatroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easy
 
MySQL Replication: Pros and Cons
MySQL Replication: Pros and ConsMySQL Replication: Pros and Cons
MySQL Replication: Pros and Cons
 
MySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & DemoMySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & Demo
 
MySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group ReplicationMySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group Replication
 
Understanding oracle rac internals part 2 - slides
Understanding oracle rac internals   part 2 - slidesUnderstanding oracle rac internals   part 2 - slides
Understanding oracle rac internals part 2 - slides
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022State of the Dolphin - May 2022
State of the Dolphin - May 2022
 
Understanding oracle rac internals part 1 - slides
Understanding oracle rac internals   part 1 - slidesUnderstanding oracle rac internals   part 1 - slides
Understanding oracle rac internals part 1 - slides
 
How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?
 
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdfProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
 
MySQL Connectors 8.0.19 & DNS SRV
MySQL Connectors 8.0.19 & DNS SRVMySQL Connectors 8.0.19 & DNS SRV
MySQL Connectors 8.0.19 & DNS SRV
 
MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08
 
Best Practices for the Most Impactful Oracle Database 18c and 19c Features
Best Practices for the Most Impactful Oracle Database 18c and 19c FeaturesBest Practices for the Most Impactful Oracle Database 18c and 19c Features
Best Practices for the Most Impactful Oracle Database 18c and 19c Features
 
What’s New in Oracle Database 19c - Part 1
What’s New in Oracle Database 19c - Part 1What’s New in Oracle Database 19c - Part 1
What’s New in Oracle Database 19c - Part 1
 

Similar to MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0

Using MySQL in Automated Testing
Using MySQL in Automated TestingUsing MySQL in Automated Testing
Using MySQL in Automated Testing
Morgan Tocker
 
01 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv101 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv1
Ivan Ma
 

Similar to MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0 (20)

Upgrading to my sql 8.0
Upgrading to my sql 8.0Upgrading to my sql 8.0
Upgrading to my sql 8.0
 
Automatic upgrade and new error logging in my sql 8.0
Automatic upgrade and new error logging in my sql 8.0Automatic upgrade and new error logging in my sql 8.0
Automatic upgrade and new error logging in my sql 8.0
 
MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance Tuning
 
My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015
 
MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015
 
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
 
MySQL Day Paris 2018 - Introduction & The State of the Dolphin
MySQL Day Paris 2018 - Introduction & The State of the DolphinMySQL Day Paris 2018 - Introduction & The State of the Dolphin
MySQL Day Paris 2018 - Introduction & The State of the Dolphin
 
Using MySQL in Automated Testing
Using MySQL in Automated TestingUsing MySQL in Automated Testing
Using MySQL in Automated Testing
 
Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7
 
5 razões estratégicas para usar MySQL
5 razões estratégicas para usar MySQL5 razões estratégicas para usar MySQL
5 razões estratégicas para usar MySQL
 
My sql8 innodb_cluster
My sql8 innodb_clusterMy sql8 innodb_cluster
My sql8 innodb_cluster
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
 
What's New in MySQL 5.7
What's New in MySQL 5.7What's New in MySQL 5.7
What's New in MySQL 5.7
 
MySQL Technology Overview
MySQL Technology OverviewMySQL Technology Overview
MySQL Technology Overview
 
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
 
MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?
 
01 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv101 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv1
 
MySQL Tech Tour 2015 - 5.7 Connector/J/Net
MySQL Tech Tour 2015 - 5.7 Connector/J/NetMySQL Tech Tour 2015 - 5.7 Connector/J/Net
MySQL Tech Tour 2015 - 5.7 Connector/J/Net
 
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
 

More from Olivier DASINI

MySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirements
MySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirementsMySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirements
MySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirements
Olivier DASINI
 
MySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document StoreMySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document Store
Olivier DASINI
 

More from Olivier DASINI (20)

MySQL High Availability Solutions - Avoid loss of service by reducing the r...
MySQL High Availability Solutions  -  Avoid loss of service by reducing the r...MySQL High Availability Solutions  -  Avoid loss of service by reducing the r...
MySQL High Availability Solutions - Avoid loss of service by reducing the r...
 
MySQL Document Store for Modern Applications
MySQL Document Store for Modern ApplicationsMySQL Document Store for Modern Applications
MySQL Document Store for Modern Applications
 
MySQL Performance Best Practices
MySQL Performance Best PracticesMySQL Performance Best Practices
MySQL Performance Best Practices
 
MySQL 8.0.22 - New Features Summary
MySQL 8.0.22 - New Features SummaryMySQL 8.0.22 - New Features Summary
MySQL 8.0.22 - New Features Summary
 
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL TeamMySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
 
MySQL 8.0.21 - New Features Summary
MySQL 8.0.21 - New Features SummaryMySQL 8.0.21 - New Features Summary
MySQL 8.0.21 - New Features Summary
 
MySQL 8.0.19 - New Features Summary
MySQL 8.0.19 - New Features SummaryMySQL 8.0.19 - New Features Summary
MySQL 8.0.19 - New Features Summary
 
MySQL 8.0.18 - New Features Summary
MySQL 8.0.18 - New Features SummaryMySQL 8.0.18 - New Features Summary
MySQL 8.0.18 - New Features Summary
 
MySQL 8.0.17 - New Features Summary
MySQL 8.0.17 - New Features SummaryMySQL 8.0.17 - New Features Summary
MySQL 8.0.17 - New Features Summary
 
MySQL 8.0.16 New Features Summary
MySQL 8.0.16 New Features SummaryMySQL 8.0.16 New Features Summary
MySQL 8.0.16 New Features Summary
 
MySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirements
MySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirementsMySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirements
MySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirements
 
MySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document StoreMySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document Store
 
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
 
MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018
 
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
 
MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store - A Document Store with all the benefts of a Transactona...MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store - A Document Store with all the benefts of a Transactona...
 
MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL 5.7 InnoDB Cluster (Jan 2018)MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL 5.7 InnoDB Cluster (Jan 2018)
 
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP ParisMySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
 
MySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise EditionMySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise Edition
 
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud ServiceMySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
 

Recently uploaded

Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 

MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0

  • 1. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Upgrade from MySQL 5.7 to MySQL 8.0 Olivier Dasini MySQL Principal Solutions Architect EMEA olivier.dasini@oracle.com Twitter : @freshdaz Blog : http://dasini.net/blog
  • 2. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 2
  • 3. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Me, Myself & I ➢ MySQL Geek ✔ Addicted to MySQL for 15+ years! ✔ Playing with databases for 20+ years ➢ MySQL Writer, Blogger and Speaker ✔ Also former : DBA, Consultant, Architect, Trainer, ... ➢ MySQL Principal Solutions Architect EMEA at Oracle ➢ Stay tuned! : ✔ Twitter : @freshdaz ✔ Blog : http://dasini.net/blog 3 Olivier DASINI
  • 4. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Why upgrade? • New features – MySQL JSON Document Store, CTE, Window Functions, JSON, GIS, … • Security improvements – New Authentication Plugin, SQL Roles, Undo/Redo & Tablespaces Encryption, … • Performance/Scalability improvements – Cost Model, Histograms, P_S, I_S, Scaling R/W workloads, Resource Groups, … • Manageability – Set Persist, Invisible Indexes, Restart command, Instant Add Column, … • Reduce tech debt for the MySQL installation • Stay on fully supported release • … 4
  • 5. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Support Life Cycle Release GA Date Premier Support End Extended Support End Sustaining Support End MySQL 5.0 Oct 2005 Dec 2011 N/A Indefinite MySQL 5.1 Dec 2008 Dec 2013 N/A Indefinite MySQL 5.5 Dec 2010 Dec 2015 Dec 2018 Indefinite MySQL 5.6 Feb 2013 Feb 2018 Feb 2021 Indefinite MySQL 5.7 Oct 2015 Oct 2020 Oct 2023 Indefinite MySQL 8.0 Apr 2018 Apr 2023 Feb 2026 Indefinite 5 http://www.oracle.com/us/support/library/lifetime-support-technology-069183.pdf
  • 6. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Why upgrade? - MySQL 8.0 Security improvement 6 • SSL enabled by default • Force root password during install • Stronger passwords • New Authentication Plugin • MySQL Enterprise Edition: – MySQL Audit – MySQL Monitor – MySQL Backup – MySQL Firewall – MySQL Encryption – MySQL Transparent Data Encryption – MySQL Data Masking and De-identification – MySQL Thread Pool • https://dev.mysql.com/doc/mysql-security-excerpt/8.0/en/
  • 7. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 7 OS : Oracle Linux 7.4 CPU : 48cores-HT Intel Skylake 2.7Ghz (2CPU sockets, Intel(R) Xeon(R) Platinum 8168 CPU) RAM: 256GB Storage : x2 Intel Optane flash devices (Intel (R) Optane (TM) SSD P4800X Series) MySQL 8.0 Sysbench Benchmark Why upgrade? - Better performance: Reads & Writes OS : Oracle Linux 7.4 CPU : 48cores-HT Intel Skylake 2.7Ghz (2CPU sockets, Intel(R) Xeon(R) Platinum 8168 CPU) RAM: 256GB Storage : x2 Intel Optane flash devices (Intel (R) Optane (TM) SSD P4800X Series) IO Bound Read Only (Point Selects) Read Write (update nokey) http://dimitrik.free.fr/blog/posts/mysql-performance-1m-iobound-qps-with-80-ga-on-intel-optane-ssd.html http://dimitrik.free.fr/blog/posts/mysql-performance-80-and-sysbench-oltp_rw-updatenokey.html
  • 8. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL Upgrade – Supported Paths • All minor upgrades like 5.7.21 to 5.7.22 or doing a jump like 5.7.20 to 5.7.24 is supported • Upgrading one major (5.6 - 5.7) release level is supported – It’s recommended upgrading to the latest 5.6 release before moving to 5.7 • Doing long-jumps (5.1 – 5.7) is supported if you upgrade one release level at a time – 5.1 → 5.5 → 5.6 → 5.7 → 8.0 • Direct upgrades that skip a release level (for example, upgrading directly from MySQL 5.5 to 8.0) is not recommended • Yon can not upgrade from DMR to GA 8
  • 9. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Overview of MySQL 8.0 features • What’s New in MySQL 8.0? (Generally Available) – https://mysqlserverteam.com/whats-new-in-mysql-8-0-generally-available/ • Changes in MySQL 8.0.11 (General Availability) – https://mysqlserverteam.com/changes-in-mysql-8-0-11-general-availability/ • The MySQL 8.0.12 Maintenance Release is Generally Available – https://mysqlserverteam.com/the-mysql-8-0-12-maintenance-release-is-generally-available/ • The MySQL 8.0.13 Maintenance Release is Generally Available – https://mysqlserverteam.com/the-mysql-8-0-13-maintenance-release-is-generally-available/ 9
  • 10. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL 8.0 Deprecation/Removals - Samples • Features removed – Query Cache, Non-native partitioning, ... • Options and variables removed – Log_errors/log_warnings replaced by log_error_verbosity – SQL Modes removed – ... • Account management – The PASSWORD() function has been removed, using GRANT to create users is no longer supported • Syntaxes affected – EXTENDED and PARTITIONS keywords for EXPLAIN removed – N as a synonym for NULL in SQL removed. Use NULL instead 10
  • 11. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL 8.0 Defaults Changes - Samples • There are a lot of changes to the defaults in 8.0, see – https://mysqlserverteam.com/new-defaults-in-mysql-8-0/ • Some important ones: – Default character set and collation to utf8mb4 and utf8mb4_0900_ai_ci – The default/preferred authentication plugin caching_sha2_password – innodb_undo_tablespaces changed from 0 to 2 – log_bin has been changed from OFF to ON 11
  • 12. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | New Servers Default’s in MySQL 8.0 • charset_set_server=utf8mb4 • collation_server=utf8mb4_0900_ai_ci • validate_password_check_user_name=ON • event_scheduler=ON • log_bin=ON • server_id=1 • log-slave-updates=ON • expire_log_days=30 • master-info-repository=TABLE • relay-log-info-repository=TABLE • transaction-write-set-extraction=XXHASH64 • … and many more, see link below for more details 12 https://mysqlserverteam.com/new-defaults-in-mysql-8-0/
  • 13. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL Upgrade – Before you start! • Review "Changes in MySQL 8.0" for changes that may require action before upgrading – https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html • Review "What Is New in MySQL 8.0" for deprecated and removed features. – https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html • Review "Server and Status Variables and Options Added, Deprecated, or Removed in MySQL 8.0". – If you use deprecated or removed variables, an upgrade may require configuration changes. – https://dev.mysql.com/doc/refman/8.0/en/added-deprecated-removed.html • Review "Release Notes" for information about fixes, changes, and new features. – https://dev.mysql.com/doc/relnotes/mysql/8.0/en/ • Create a plan for your upgrade/downgrade path 13 https://dev.mysql.com/doc/refman/8.0/en/upgrade-before-you-begin.html
  • 14. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Before you Upgrade – Backups of Your Data! • Database upgrading is very serious work! – So backup your data! • Plan for the worst - Paranoia is not always a bad things – So backup your data! • Use your favorite backup tool – MySQL Enterprise Backup – mysqldump – … • Double check your backups • Test your Restore procedure 14 Credit: https://tricyclefish.com/wp-content/uploads/2016/01/back-up1.jpg
  • 15. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Is your MySQL server instance ready for upgrade? 15
  • 16. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Is your MySQL server instance ready for upgrade? 17 • Preliminary checks... 1. Usage of old temporal type? 2. Conflicting db object names and reserved keywords? 3. Usage of utf8mb3 charset? 4. Reserved tablenames in mysql schema? 5. FK names longer than 64 chars? 6. Usage of obsolete sql_mode? 7. ENUM/SET column definitions containing elements longer than 255 characters? 8. Usage of partitioned tables in shared tablespaces? 9. Usage of removed functions? 10.Usage of removed GROUP BY ASC/DESC? 11.Issues reported by ”check table x for upgrade” command? – ... https://dev.mysql.com/doc/refman/8.0/en/upgrade-prerequisites.html Credit: https://emojiisland.com/products/omg-face-emoji-icon
  • 17. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Upgrade Checker Utility 18 Credit: https://emojiisland.com/products/thumbs-up-hand-sign-emoji-icon
  • 18. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Upgrade Checker Utility - checkForServerUpgrade 19 • New tool in MySQL Shell – JS> util.checkForServerUpgrade() • Will check your MySQL 5.7 or 8.0 installation readiness for upgrade – Check for legacy issues – Running the tool on the 5.7 installation, users can make changes when time permits before the upgrade • It is in active development and more checks will be added – Part of MySQL update releases mysqlsh -- util check-for-server-upgrade { --user=root --host=172.25.0.10 } mysqlsh -e "util.checkForServerUpgrade({user:'root', host:'172.25.0.10'})" MYSQL JS> util.checkForServerUpgrade("root@172.25.0.10", {outputFormat:'JSON'}) Examples: https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-utilities-upgrade.html
  • 19. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Upgrade Checker Utility - checkForServerUpgrade 20
  • 20. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Your MySQL server instance is ready for upgrade! 21 o/
  • 21. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Wait!!! 22 :-0
  • 22. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Before you Upgrade – Backups of Your Data! Did I mention BACKUP? 23 ;-)
  • 23. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | In-place Upgrade 24
  • 24. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL Upgrade – In-place Upgrade 1. Do all necessary preparations/plans/upgrade checker as explained earlier – e.g. mysqlsh -- util check-for-server-upgrade { --user=root --host=172.25.0.10 } 2. Create a backup of your database (data, logs, config files) 3. Do a graceful shutdown of MySQL (innodb_fast_shutdown=0) 4. Install MySQL 8.0, replace the old binaries with the new ones 5. Start new MySQL 8.0 Server using new binaries and new my.cnf 6. Run mysql_upgrade – mysql_upgrade examines all tables in all databases for incompatibilities with the current version of MySQL. – mysql_upgrade also upgrades the system tables so that you can take advantage of new privileges or capabilities. 7. Restart the server and look at messages in the error log 8. Verify that apps and services are working as expected 25
  • 25. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Caching SHA-2 Pluggable Authentication 26
  • 26. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | caching_sha2_password 27 • caching_sha2_password : new default Authentication plugin in 8.0 – Requires password exchange using a secure connection ● TCP using TLS/SSL credentials, ● a Unix socket file, or shared memory, ● or an unencrypted connection that supports password exchange using an RSA key pair – Then cached a copy of the password hash in memory – MySQL 5.7 default is mysql_native_password ● Relies on SHA1 algorithm and NIST has suggested to stop using it
  • 27. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | caching_sha2_password 28 • New users created in MySQL 8.0 will use the caching_sha2_password as their authentication plugin – User accounts already created in existing instances are not altered as a part of an upgrade ALTER USER 'daz'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'password'; Examples: Existing users who wish to switch to caching_sha2_password
  • 28. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | caching_sha2_password - Issues 29 • If you encounter compatibility issues after upgrading to MySQL 8.0 the simplest way to address those issues is to reconfigure the server to revert to the previous default authentication plugin, mysql_native_password : Examples: [mysqld] default_authentication_plugin=mysql_native_password • This setting should be viewed as temporary, not as a long term or permanent solution https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password https://mysqlserverteam.com/mysql-8-0-4-new-default-authentication-plugin-caching_sha2_password/
  • 29. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Keep in mind 30
  • 30. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL Upgrade – Keep in mind! • Performance/Scalability monitoring and testing – Consider MySQL Enterprise Monitor 8.0 • Do you need to consider replication between different versions – Primary:5.7 → Replica: 8.0 • Changes in default values • Statements creating warnings/errors • New optimizer features causing query plan changes • Monitor resource usage (iostat, top, vmstat etc) • Upgrade connectors as well • Backup/Restore processes are your best insurance 31
  • 31. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL Upgrade – Recap • Prepare your upgrade (release notes, resources) • DO run the Upgrade Checker Utility –Fix issues until it runs clean • TEST your applications on MySQL 8.0 • DO your backup • Upgrade to MySQL 8.0 • Enjoy! :) 32
  • 32. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL Upgrade Resources • https://dev.mysql.com/doc/refman/8.0/en/upgrading-strategies.html#upgrade-prerequisites • https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html • https://mysqlserverteam.com/inplace-upgrade-from-mysql-5-7-to-mysql-8-0/ • https://mysqlserverteam.com/upgrading-to-mysql-8-0-here-is-what-you-need-to-know/ • https://mysqlserverteam.com/mysql-shell-8-0-4-introducing-upgrade-checker-utility/ • https://mysqlserverteam.com/upgrading-to-mysql-8-0-with-spatial-data/ • https://mysqlserverteam.com/whats-new-in-mysql-8-0-generally-available/ • https://mysqlserverteam.com/upgrading-your-mysql-server-farm/ • https://mysqlserverteam.com/mysql-8-0-collations-migrating-from-older-collations/ • https://mysqlserverteam.com/new-defaults-in-mysql-8-0/ 33
  • 33. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL Resources 34 • MySQL Server Team Blog – http://mysqlserverteam.com/ • MySQL High Availability Blog – http://mysqlhighavailability.com/ • MySQL Release Engineering Blog – https://mysqlrelease.com/ • MySQL Dev Team Blog – https://insidemysql.com/ • MySQL Enterprise Team Blogs – https://blogs.oracle.com/mysql/ • Lefred’s blog – https://jefred.be • Jesper’s blog – https://mysql.wisborg.dk • Dimitri’s blog – http://dimitrik.free.fr/blog/ • Andrew’s blog – https://thesubtlepath.com/blog/ • Olivier Dasini’s blog – http://dasini.net/blog/
  • 34. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Thank you!