SlideShare una empresa de Scribd logo
1 de 37
Descargar para leer sin conexión
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Upgrading to MySQL 8.0+, a More Automated
Upgrade Experience
Ståle Deraas, Software Development Director
Oracle, MySQL
Oct 2018
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
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. |
Agenda
Introduction
A straight forward upgrade to MySQL 8.0
Upgrade to MySQL 8.0 in detail
A better future with MySQL 8.0 ->
1
2
3
4
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Introduction
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Upgrading in General
• Why upgrade the MySQL installation?
– Security concerns
– Performance and Scalability
– New functionality
– Reduce tech debt for the MySQL installation
• Multiple version upgrade is complex (5.6 -> 5.7 -> 8.0)
• Eg. deprecated functionality in 5.7, removed in 8.0
5
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Why do we postpone upgrades?
• Do we have the required knowledge?
• Do we have the required resources?
• Do we have the time?
• Cost for doing the actual work necessary to upgrade
– For DBAs and possibly consultants
• Can we afford it?
– Cost for lost business during the switchover, depending on downtime
6
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Upgrading in General - Biting the Bullet
• At some point upgrade needs to happen!
• DBA input regarding upgrading MySQL
– Reducing risk and cost is key
– Total duration of upgrade should be short
– For customer apps, keep old MySQL behaviour by default, change behavior later
– Want to test new version gradually
– When switching, downtime should be minimal
7
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Upgrade to MySQL 8.0
The straightforward case
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL upgrade 5.7 -> 8.0, smooth sailing!
9
• Read release notes: Conclusion – No problems
• Run upgrade_checker
me@siv20$ ./mysqlsh root:@localhost:3307 -e "util.checkForServerUpgrade();”
The MySQL server at localhost:3307 will now be checked for compatibility issues for upgrade to
MySQL 8.0...
MySQL version: 5.7.24 - Source distribution
1) Usage of db objects with names conflicting with reserved keywords in 8.0
No issues found
2) Usage of utf8mb3 charset
No issues found
.....
No known compatibility errors or issues for upgrading the target server to MySQL 8 were found.
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL upgrade 5.7 -> 8.0, smooth sailing! Con’t
10
• Backup your data directory, install and start MySQL 8.0
– In-place upgrade
• Run mysql_upgrade
• me@siv20$ ./mysql_upgrade --socket=/me/mysql/mysql.sock --port=3307 --user=root
• Checking if update is needed.
• Checking server version.
• Running queries to upgrade MySQL server.
• Upgrading system table data.
• Checking system database.
• mysql.columns_priv OK
• mysql.component OK
• mysql.db OK
...
• Upgrade process completed successfully.
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL upgrade 5.7 -> 8.0, smooth sailing! Con’t
11
• Restart the server and look at messages in the error log
2018-10-06T09:11:28.167169Z 0 [System] [MY-010116] [Server] /me/mysqld (mysqld 8.0.12) starting as process 27147
2018-10-06T09:11:30.261139Z 0 [System] [MY-010931] [Server] /me/mysqld: ready for connections. Version:
'8.0.12' socket: ’/me/mysql/mysql.sock' port: 3307 Source distribution
• Verify that apps and services are working as expected
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Improvements to upgrade to MySQL 8.0
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Goals for the MySQL upgrade experience
• Upgrade to be faster and with lower risk
– Eliminate legacy issues with metadata
• Transition from legacy metadata handling to transactional data dictionary
• The upgrade process will produce a consistent data dictionary
• Help DBAs upgrading to MySQL 8.0
– Better support preparing for the upgrade
• Added upgrade_checker to the MySQL Shell
– Better support during the upgrade
• Added upgrade checks to MySQL server
• Prohibit legacy issues from entering the 8.0 metadata store
13
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL Data Dictionary before MySQL 8.0
14
Data Dictionary
Files
FRM TRG OPT
System Tables (mysql.)
user procevents
InnoDB System Tables
MyISAM
File system
InnoDB
SQL
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Transactional Data Dictionary in MySQL 8.0
15
Data Dictionary
InnoDB
SQL
DD TableDD TableDD Table
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Typical upgrade procedure
• Let a slave have the new version, and receive all data
• Test applications on new slave, and possibly adapt applications
• Let slave receive production traffic
• Upgrade remaining slaves
• Finally promote master
16
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
The traditional MySQL upgrade
• Consider standalone ”in-place” upgrade, new SW on existing data image
– Proper backups are assumed
1. Stop old MySQL server
2. Change binaries to new MySQL server version
3. Adjust config, my.cnf of new server version
4. Start new MySQL server
5. Run mysql_upgrade to possibly upgrade system tables and user tables
6. Restart MySQL server
17
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Upgrade to 8.0 in detail and how the
upgrade_checker helps
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL 8.0 Features
19
• Read release notes https://dev.mysql.com/doc/relnotes/mysql/8.0/en/
and https://dev.mysql.com/doc/refman/8.0/en/upgrading.html
• Read blogs on https://mysqlserverteam.com
• New features in 8.0, and there is a lot of them
– Transactional Data Dictionary, and Atomic DDL
– Geography support
– Roles
– Persistent runtime configuration
– ++++
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
• Secure_auth system var, --secure-auth client option and MYSQL_SECURE_AUTH from mysql options
• 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
20
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL 8.0 Defaults Changes
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 characterset 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
– Upgrade from MySQL 5.7: ALTER INSTANCE ROTATE INNODB MASTER KEY
21
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL 8.0 Defaults Changes
–Especially note, character set and collation defaults changes
– Note that for upgrading SCHEMAs from 5.7 to 8.0, each shema has it’s own specified
default charset and collation, so nothing needs to be done to preserve this
– Rolling upgrade with a 5.7 master
• For new schemas using defaults, you will get the master’s charset and collation on the 8.0 slaves too
• New tables in existing schemas inherit the schemas defaults, so ”no problem”
22
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL upgrade_checker
– New tool in MySQL 5.7 Shell
– upgrade_checker will check your MySQL 5.7 installation readiness for upgrade
– Clean up legacy issues
• Running the tool on the 5.7 installation, users can make changes when time permits before the
upgrade
– upgrade_checker is in active development and more checks will be added
• Part of MySQL update releases
– NOTE We think it is unlikely that there are installations with all the issues explained
in the following slides
23
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
• Usage of old temporal type
• Conflicting db object names and
reserved keywords
• Usage of utf8mb3 charset
• Reserved tablenames in mysql
schema
• FK names longer than 64 chars
• Usage of obsolete sql_mode
• ENUM/SET column definitions
containing elements longer than
255 characters
• Usage of partitioned tables in
shared tablespaces
• Usage of removed functions
• Usage of removed GROUP BY
ASC/DESC
• Issues reported by ”check table x
for upgrade” command
24
MySQL upgrade_checker
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Issues detected by the upgrade_checker: example 1
• The Transactional Data Dictionary is stored as tables in mysql schema, and
can not conflict with user table names
– Detect with SQL:
SELECT TABLE_SCHEMA, TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
WHERE LOWER(TABLE_SCHEMA) = 'mysql’ and LOWER(TABLE_NAME) IN ( 'catalogs’,
’character_sets’....);
– ACTION: RENAME tables with conflicting name
25
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Issues detected by the upgrade_checker: example 2
• In MySQL 5.7, several spatial functions available under multiple names
were deprecated. Example PointFromText
– Detect with SQL:
Use INFORMATION_SCHEMA to look at VIEW definitions like e.g. :
select table_name from information_schema.views where view_definition like "%function%”
Do similar for ROUTINE, TRIGGER,EVENT, GC
– ACTION: Use the new function in 8.0 with prefix ’ST_’ or ’MBR’
– ALTER TABLE t_gcol_dep MODIFY g POINT GENERATED ALWAYS AS (ST_POINTFROMTEXT(POINT(10, 10)));
26
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Issues detected by the upgrade_checker: example 3
• Data types like e.g old style decimals, old style TIME/DATETIME etc that
have persisted up until MySQL 5.7 due to the binary upgrade will not be
supported in MySQL 8.0
– Tables using this type can be identified by running CHECK TABLE…FOR UPGRADE or
mysqlcheck with check-upgrade option in MySQL 5.7
– ACTION: fix through REPAIR TABLE and dump/reload for old style varchar/old style
decimal
27
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
When the upgrade_checker runs clean
28
• Backup your data directory, and install new MySQL 8.0 version
• Run mysql_upgrade
• Restart the server and inspect the error log
• Reconnect apps and verify they work as expected
• Attempting upgrade without a clean upgrade_checker run will abort the
upgrade
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
A better future with MySQL 8.0 ->
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Upgrade MySQL 8.0 ->
• How can we continue improving the upgrade?
–We want to reduce time and risk even further
• Bulk of time spent for in-place upgrade of MySQL:
–Harvest metadata for analysis
–Examine all user tables
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Transactional Data Dictionary in MySQL 8.0
31
Data Dictionary
InnoDB
SQL
DD TableDD TableDD Table
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Upgrade MySQL 8.0 ->
• MySQL now stores all metadata in InnoDB (Done)
– Enables fast metadata analysis with SQL-queries
• Added metadata for versioning (Done)
– The new mysqld executable knows which version it is upgrading from
• Improved protection of metadata, good for security reasons (Partly done)
– Enforced metadata integrity
• Remove need for mysql_upgrade client (WIP)
– Move functionality to mysqld proper
– Docker/container friendly
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Upgrade MySQL 8.0 -> the GREAT news
• The traditional MySQL upgrade revisited
1. Stop old MySQL server
2. Change binaries to new MySQL server version
3. Adjust config, my.cnf of new server version
4. Start new MySQL server
• Analyze metadata and automatically upgrade, making upgrade process fast
5. Run mysq_upgrade to possibly upgrade system tables and user tables
• Potentially time consuming
6. Restart MySQL server
• Reduces downtime, container/docker friendly
33
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Summary: Upgrade MySQL 8.0 ->
• Lowers risk
– The upgrade_checker identifies potential issues
• In active development
– Metadata integrity
• Faster upgrade process
– Fast metadata analysis
– Fast metadata upgrade
– Removal of mysql_upgrade
• Simplified upgrade process
– Fewer steps
– Automatic metadata upgrade
34
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Recap: Upgrade to MySQL 8.0
• Prepare your upgrade (release notes, resources)
• DO run the upgrade_checker
– Fix issues until it runs clean
• TEST your applications on MySQL 8.0
• DO your backup
• Upgrade to MySQL 8.0
35
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Try for yourself!
• Downloadable 8.0.13
– http://dev.mysql.com
• Enjoy and give us your feedback!
• Thank you for listening
• http://mysqlserverteam.com
36
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/

Más contenido relacionado

La actualidad más candente

MySQL Tech Tour 2015 - 5.7 Security
MySQL Tech Tour 2015 - 5.7 SecurityMySQL Tech Tour 2015 - 5.7 Security
MySQL Tech Tour 2015 - 5.7 SecurityMark Swarbrick
 
MySQL Enterprise Portfolio
MySQL Enterprise PortfolioMySQL Enterprise Portfolio
MySQL Enterprise PortfolioAbel Flórez
 
MySQL 5.7 Replication News
MySQL 5.7 Replication News MySQL 5.7 Replication News
MySQL 5.7 Replication News Ted Wennmark
 
MySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document StoreMySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document StoreAbel Flórez
 
MySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats newMySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats newMark Swarbrick
 
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 - jun15MySQL Brasil
 
MySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA optionsMySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA optionsTed Wennmark
 
MySQL Intro JSON NoSQL
MySQL Intro JSON NoSQLMySQL Intro JSON NoSQL
MySQL Intro JSON NoSQLMark Swarbrick
 
MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...
MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...
MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...OracleMySQL
 
MySQL Tech Tour 2015 - Alt Intro
MySQL Tech Tour 2015 - Alt IntroMySQL Tech Tour 2015 - Alt Intro
MySQL Tech Tour 2015 - Alt IntroMark Swarbrick
 
01 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv101 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv1Ivan Ma
 
OUG Harmony 2012 - Using SQL Plan Baselines for Performance Testing
OUG Harmony 2012 -  Using SQL Plan Baselines for Performance TestingOUG Harmony 2012 -  Using SQL Plan Baselines for Performance Testing
OUG Harmony 2012 - Using SQL Plan Baselines for Performance TestingMaris Elsins
 
MySQL Manchester TT - Security
MySQL Manchester TT  - SecurityMySQL Manchester TT  - Security
MySQL Manchester TT - SecurityMark Swarbrick
 
Oracle Enterprise Manager Cloud Control 13c for DBAs
Oracle Enterprise Manager Cloud Control 13c for DBAsOracle Enterprise Manager Cloud Control 13c for DBAs
Oracle Enterprise Manager Cloud Control 13c for DBAsGokhan Atil
 
MySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & TuneMySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & TuneMark Swarbrick
 
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016Geir Høydalsvik
 
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)OracleMySQL
 

La actualidad más candente (20)

MySQL Tech Tour 2015 - 5.7 Security
MySQL Tech Tour 2015 - 5.7 SecurityMySQL Tech Tour 2015 - 5.7 Security
MySQL Tech Tour 2015 - 5.7 Security
 
MySQL Enterprise Portfolio
MySQL Enterprise PortfolioMySQL Enterprise Portfolio
MySQL Enterprise Portfolio
 
MySQL 5.7 Replication News
MySQL 5.7 Replication News MySQL 5.7 Replication News
MySQL 5.7 Replication News
 
MySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document StoreMySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document Store
 
MySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats newMySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats new
 
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 Cluster
MySQL ClusterMySQL Cluster
MySQL Cluster
 
MySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA optionsMySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA options
 
MySQL Intro JSON NoSQL
MySQL Intro JSON NoSQLMySQL Intro JSON NoSQL
MySQL Intro JSON NoSQL
 
MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...
MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...
MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...
 
MySQL Tech Tour 2015 - Alt Intro
MySQL Tech Tour 2015 - Alt IntroMySQL Tech Tour 2015 - Alt Intro
MySQL Tech Tour 2015 - Alt Intro
 
01 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv101 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv1
 
OUG Harmony 2012 - Using SQL Plan Baselines for Performance Testing
OUG Harmony 2012 -  Using SQL Plan Baselines for Performance TestingOUG Harmony 2012 -  Using SQL Plan Baselines for Performance Testing
OUG Harmony 2012 - Using SQL Plan Baselines for Performance Testing
 
MySQL Cluster
MySQL ClusterMySQL Cluster
MySQL Cluster
 
MySQL Manchester TT - Security
MySQL Manchester TT  - SecurityMySQL Manchester TT  - Security
MySQL Manchester TT - Security
 
Mysql security 5.7
Mysql security 5.7 Mysql security 5.7
Mysql security 5.7
 
Oracle Enterprise Manager Cloud Control 13c for DBAs
Oracle Enterprise Manager Cloud Control 13c for DBAsOracle Enterprise Manager Cloud Control 13c for DBAs
Oracle Enterprise Manager Cloud Control 13c for DBAs
 
MySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & TuneMySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & Tune
 
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
 
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
 

Similar a Upgrading to my sql 8.0

MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0Olivier DASINI
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance TuningMark Swarbrick
 
Pl17: MySQL 8.0: security
Pl17: MySQL 8.0: securityPl17: MySQL 8.0: security
Pl17: MySQL 8.0: securityGeorgi Kodinov
 
Automatic upgrade and new error logging in my sql 8.0 oct
Automatic upgrade and new error logging in my sql 8.0 octAutomatic upgrade and new error logging in my sql 8.0 oct
Automatic upgrade and new error logging in my sql 8.0 octStåle Deraas
 
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015 2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015 Geir Høydalsvik
 
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.7Olivier DASINI
 
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...GeneXus
 
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 DolphinOlivier DASINI
 
MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?Olivier DASINI
 
6 Tips to MySQL Performance Tuning
6 Tips to MySQL Performance Tuning6 Tips to MySQL Performance Tuning
6 Tips to MySQL Performance TuningOracleMySQL
 
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?Alkin Tezuysal
 
Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7Morgan Tocker
 
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.Cloud Native Day Tel Aviv
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAsBen Krug
 
MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014Dave Stokes
 
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...Olivier DASINI
 
Using The Mysql Binary Log As A Change Stream
Using The Mysql Binary Log As A Change StreamUsing The Mysql Binary Log As A Change Stream
Using The Mysql Binary Log As A Change StreamLuís Soares
 
Using MySQL in Automated Testing
Using MySQL in Automated TestingUsing MySQL in Automated Testing
Using MySQL in Automated TestingMorgan Tocker
 

Similar a Upgrading to my sql 8.0 (20)

MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance Tuning
 
Pl17: MySQL 8.0: security
Pl17: MySQL 8.0: securityPl17: MySQL 8.0: security
Pl17: MySQL 8.0: security
 
Automatic upgrade and new error logging in my sql 8.0 oct
Automatic upgrade and new error logging in my sql 8.0 octAutomatic upgrade and new error logging in my sql 8.0 oct
Automatic upgrade and new error logging in my sql 8.0 oct
 
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015 2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
 
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 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 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
 
MySQL 5.7 what's new
MySQL 5.7 what's newMySQL 5.7 what's new
MySQL 5.7 what's new
 
MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?
 
6 Tips to MySQL Performance Tuning
6 Tips to MySQL Performance Tuning6 Tips to MySQL Performance Tuning
6 Tips to MySQL Performance Tuning
 
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?
 
My sql8 innodb_cluster
My sql8 innodb_clusterMy sql8 innodb_cluster
My sql8 innodb_cluster
 
Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7
 
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 for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
 
MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014
 
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...
 
Using The Mysql Binary Log As A Change Stream
Using The Mysql Binary Log As A Change StreamUsing The Mysql Binary Log As A Change Stream
Using The Mysql Binary Log As A Change Stream
 
Using MySQL in Automated Testing
Using MySQL in Automated TestingUsing MySQL in Automated Testing
Using MySQL in Automated Testing
 

Último

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburgmasabamasaba
 

Último (20)

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 

Upgrading to my sql 8.0

  • 1. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Upgrading to MySQL 8.0+, a More Automated Upgrade Experience Ståle Deraas, Software Development Director Oracle, MySQL Oct 2018 Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
  • 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. | Agenda Introduction A straight forward upgrade to MySQL 8.0 Upgrade to MySQL 8.0 in detail A better future with MySQL 8.0 -> 1 2 3 4
  • 4. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Introduction
  • 5. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Upgrading in General • Why upgrade the MySQL installation? – Security concerns – Performance and Scalability – New functionality – Reduce tech debt for the MySQL installation • Multiple version upgrade is complex (5.6 -> 5.7 -> 8.0) • Eg. deprecated functionality in 5.7, removed in 8.0 5
  • 6. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Why do we postpone upgrades? • Do we have the required knowledge? • Do we have the required resources? • Do we have the time? • Cost for doing the actual work necessary to upgrade – For DBAs and possibly consultants • Can we afford it? – Cost for lost business during the switchover, depending on downtime 6
  • 7. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Upgrading in General - Biting the Bullet • At some point upgrade needs to happen! • DBA input regarding upgrading MySQL – Reducing risk and cost is key – Total duration of upgrade should be short – For customer apps, keep old MySQL behaviour by default, change behavior later – Want to test new version gradually – When switching, downtime should be minimal 7
  • 8. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Upgrade to MySQL 8.0 The straightforward case
  • 9. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL upgrade 5.7 -> 8.0, smooth sailing! 9 • Read release notes: Conclusion – No problems • Run upgrade_checker me@siv20$ ./mysqlsh root:@localhost:3307 -e "util.checkForServerUpgrade();” The MySQL server at localhost:3307 will now be checked for compatibility issues for upgrade to MySQL 8.0... MySQL version: 5.7.24 - Source distribution 1) Usage of db objects with names conflicting with reserved keywords in 8.0 No issues found 2) Usage of utf8mb3 charset No issues found ..... No known compatibility errors or issues for upgrading the target server to MySQL 8 were found.
  • 10. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL upgrade 5.7 -> 8.0, smooth sailing! Con’t 10 • Backup your data directory, install and start MySQL 8.0 – In-place upgrade • Run mysql_upgrade • me@siv20$ ./mysql_upgrade --socket=/me/mysql/mysql.sock --port=3307 --user=root • Checking if update is needed. • Checking server version. • Running queries to upgrade MySQL server. • Upgrading system table data. • Checking system database. • mysql.columns_priv OK • mysql.component OK • mysql.db OK ... • Upgrade process completed successfully.
  • 11. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL upgrade 5.7 -> 8.0, smooth sailing! Con’t 11 • Restart the server and look at messages in the error log 2018-10-06T09:11:28.167169Z 0 [System] [MY-010116] [Server] /me/mysqld (mysqld 8.0.12) starting as process 27147 2018-10-06T09:11:30.261139Z 0 [System] [MY-010931] [Server] /me/mysqld: ready for connections. Version: '8.0.12' socket: ’/me/mysql/mysql.sock' port: 3307 Source distribution • Verify that apps and services are working as expected
  • 12. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Improvements to upgrade to MySQL 8.0
  • 13. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Goals for the MySQL upgrade experience • Upgrade to be faster and with lower risk – Eliminate legacy issues with metadata • Transition from legacy metadata handling to transactional data dictionary • The upgrade process will produce a consistent data dictionary • Help DBAs upgrading to MySQL 8.0 – Better support preparing for the upgrade • Added upgrade_checker to the MySQL Shell – Better support during the upgrade • Added upgrade checks to MySQL server • Prohibit legacy issues from entering the 8.0 metadata store 13
  • 14. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL Data Dictionary before MySQL 8.0 14 Data Dictionary Files FRM TRG OPT System Tables (mysql.) user procevents InnoDB System Tables MyISAM File system InnoDB SQL
  • 15. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Transactional Data Dictionary in MySQL 8.0 15 Data Dictionary InnoDB SQL DD TableDD TableDD Table
  • 16. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Typical upgrade procedure • Let a slave have the new version, and receive all data • Test applications on new slave, and possibly adapt applications • Let slave receive production traffic • Upgrade remaining slaves • Finally promote master 16
  • 17. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | The traditional MySQL upgrade • Consider standalone ”in-place” upgrade, new SW on existing data image – Proper backups are assumed 1. Stop old MySQL server 2. Change binaries to new MySQL server version 3. Adjust config, my.cnf of new server version 4. Start new MySQL server 5. Run mysql_upgrade to possibly upgrade system tables and user tables 6. Restart MySQL server 17
  • 18. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Upgrade to 8.0 in detail and how the upgrade_checker helps
  • 19. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL 8.0 Features 19 • Read release notes https://dev.mysql.com/doc/relnotes/mysql/8.0/en/ and https://dev.mysql.com/doc/refman/8.0/en/upgrading.html • Read blogs on https://mysqlserverteam.com • New features in 8.0, and there is a lot of them – Transactional Data Dictionary, and Atomic DDL – Geography support – Roles – Persistent runtime configuration – ++++
  • 20. 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 • Secure_auth system var, --secure-auth client option and MYSQL_SECURE_AUTH from mysql options • 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 20
  • 21. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL 8.0 Defaults Changes 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 characterset 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 – Upgrade from MySQL 5.7: ALTER INSTANCE ROTATE INNODB MASTER KEY 21
  • 22. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL 8.0 Defaults Changes –Especially note, character set and collation defaults changes – Note that for upgrading SCHEMAs from 5.7 to 8.0, each shema has it’s own specified default charset and collation, so nothing needs to be done to preserve this – Rolling upgrade with a 5.7 master • For new schemas using defaults, you will get the master’s charset and collation on the 8.0 slaves too • New tables in existing schemas inherit the schemas defaults, so ”no problem” 22
  • 23. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL upgrade_checker – New tool in MySQL 5.7 Shell – upgrade_checker will check your MySQL 5.7 installation readiness for upgrade – Clean up legacy issues • Running the tool on the 5.7 installation, users can make changes when time permits before the upgrade – upgrade_checker is in active development and more checks will be added • Part of MySQL update releases – NOTE We think it is unlikely that there are installations with all the issues explained in the following slides 23
  • 24. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | • Usage of old temporal type • Conflicting db object names and reserved keywords • Usage of utf8mb3 charset • Reserved tablenames in mysql schema • FK names longer than 64 chars • Usage of obsolete sql_mode • ENUM/SET column definitions containing elements longer than 255 characters • Usage of partitioned tables in shared tablespaces • Usage of removed functions • Usage of removed GROUP BY ASC/DESC • Issues reported by ”check table x for upgrade” command 24 MySQL upgrade_checker
  • 25. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Issues detected by the upgrade_checker: example 1 • The Transactional Data Dictionary is stored as tables in mysql schema, and can not conflict with user table names – Detect with SQL: SELECT TABLE_SCHEMA, TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE LOWER(TABLE_SCHEMA) = 'mysql’ and LOWER(TABLE_NAME) IN ( 'catalogs’, ’character_sets’....); – ACTION: RENAME tables with conflicting name 25
  • 26. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Issues detected by the upgrade_checker: example 2 • In MySQL 5.7, several spatial functions available under multiple names were deprecated. Example PointFromText – Detect with SQL: Use INFORMATION_SCHEMA to look at VIEW definitions like e.g. : select table_name from information_schema.views where view_definition like "%function%” Do similar for ROUTINE, TRIGGER,EVENT, GC – ACTION: Use the new function in 8.0 with prefix ’ST_’ or ’MBR’ – ALTER TABLE t_gcol_dep MODIFY g POINT GENERATED ALWAYS AS (ST_POINTFROMTEXT(POINT(10, 10))); 26
  • 27. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Issues detected by the upgrade_checker: example 3 • Data types like e.g old style decimals, old style TIME/DATETIME etc that have persisted up until MySQL 5.7 due to the binary upgrade will not be supported in MySQL 8.0 – Tables using this type can be identified by running CHECK TABLE…FOR UPGRADE or mysqlcheck with check-upgrade option in MySQL 5.7 – ACTION: fix through REPAIR TABLE and dump/reload for old style varchar/old style decimal 27
  • 28. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | When the upgrade_checker runs clean 28 • Backup your data directory, and install new MySQL 8.0 version • Run mysql_upgrade • Restart the server and inspect the error log • Reconnect apps and verify they work as expected • Attempting upgrade without a clean upgrade_checker run will abort the upgrade
  • 29. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | A better future with MySQL 8.0 ->
  • 30. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Upgrade MySQL 8.0 -> • How can we continue improving the upgrade? –We want to reduce time and risk even further • Bulk of time spent for in-place upgrade of MySQL: –Harvest metadata for analysis –Examine all user tables
  • 31. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Transactional Data Dictionary in MySQL 8.0 31 Data Dictionary InnoDB SQL DD TableDD TableDD Table
  • 32. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Upgrade MySQL 8.0 -> • MySQL now stores all metadata in InnoDB (Done) – Enables fast metadata analysis with SQL-queries • Added metadata for versioning (Done) – The new mysqld executable knows which version it is upgrading from • Improved protection of metadata, good for security reasons (Partly done) – Enforced metadata integrity • Remove need for mysql_upgrade client (WIP) – Move functionality to mysqld proper – Docker/container friendly
  • 33. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Upgrade MySQL 8.0 -> the GREAT news • The traditional MySQL upgrade revisited 1. Stop old MySQL server 2. Change binaries to new MySQL server version 3. Adjust config, my.cnf of new server version 4. Start new MySQL server • Analyze metadata and automatically upgrade, making upgrade process fast 5. Run mysq_upgrade to possibly upgrade system tables and user tables • Potentially time consuming 6. Restart MySQL server • Reduces downtime, container/docker friendly 33
  • 34. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Summary: Upgrade MySQL 8.0 -> • Lowers risk – The upgrade_checker identifies potential issues • In active development – Metadata integrity • Faster upgrade process – Fast metadata analysis – Fast metadata upgrade – Removal of mysql_upgrade • Simplified upgrade process – Fewer steps – Automatic metadata upgrade 34
  • 35. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Recap: Upgrade to MySQL 8.0 • Prepare your upgrade (release notes, resources) • DO run the upgrade_checker – Fix issues until it runs clean • TEST your applications on MySQL 8.0 • DO your backup • Upgrade to MySQL 8.0 35
  • 36. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Try for yourself! • Downloadable 8.0.13 – http://dev.mysql.com • Enjoy and give us your feedback! • Thank you for listening • http://mysqlserverteam.com 36
  • 37. 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/