SlideShare una empresa de Scribd logo
1 de 35
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

Oracle 10g Performance: chapter 02 aas
Oracle 10g Performance: chapter 02 aasOracle 10g Performance: chapter 02 aas
Oracle 10g Performance: chapter 02 aas
Kyle Hailey
 

La actualidad más candente (20)

Inside PostgreSQL Shared Memory
Inside PostgreSQL Shared MemoryInside PostgreSQL Shared Memory
Inside PostgreSQL Shared Memory
 
Open Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsOpen Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and Histograms
 
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best PracticesMySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
 
Oracle 10g Performance: chapter 02 aas
Oracle 10g Performance: chapter 02 aasOracle 10g Performance: chapter 02 aas
Oracle 10g Performance: chapter 02 aas
 
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialThe Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication Tutorial
 
MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바
 
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
 
SQL Server Performance Tuning Baseline
SQL Server Performance Tuning BaselineSQL Server Performance Tuning Baseline
SQL Server Performance Tuning Baseline
 
High Availability in MySQL 8 using InnoDB Cluster
High Availability in MySQL 8 using InnoDB ClusterHigh Availability in MySQL 8 using InnoDB Cluster
High Availability in MySQL 8 using InnoDB Cluster
 
Oracle Transparent Data Encryption (TDE) 12c
Oracle Transparent Data Encryption (TDE) 12cOracle Transparent Data Encryption (TDE) 12c
Oracle Transparent Data Encryption (TDE) 12c
 
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
 
Redo log
Redo logRedo log
Redo log
 
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
 
M|18 Deep Dive: InnoDB Transactions and Write Paths
M|18 Deep Dive: InnoDB Transactions and Write PathsM|18 Deep Dive: InnoDB Transactions and Write Paths
M|18 Deep Dive: InnoDB Transactions and Write Paths
 
New Generation Oracle RAC Performance
New Generation Oracle RAC PerformanceNew Generation Oracle RAC Performance
New Generation Oracle RAC Performance
 
My sql failover test using orchestrator
My sql failover test  using orchestratorMy sql failover test  using orchestrator
My sql failover test using orchestrator
 
MySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software TestMySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software Test
 
MariaDB MaxScale
MariaDB MaxScaleMariaDB MaxScale
MariaDB MaxScale
 
Scaling managed MySQL Platform in Flipkart - (Sachin Japate - Flipkart) - Myd...
Scaling managed MySQL Platform in Flipkart - (Sachin Japate - Flipkart) - Myd...Scaling managed MySQL Platform in Flipkart - (Sachin Japate - Flipkart) - Myd...
Scaling managed MySQL Platform in Flipkart - (Sachin Japate - Flipkart) - Myd...
 
InnoDB Locking Explained with Stick Figures
InnoDB Locking Explained with Stick FiguresInnoDB Locking Explained with Stick Figures
InnoDB Locking Explained with Stick Figures
 

Similar a 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 a 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...
 

Más de 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
 

Más de 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
 

Último

1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
pritamlangde
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 

Último (20)

HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Learn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksLearn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic Marks
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
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
 
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...
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
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
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 

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!