MySQL 8.0 is the latest Generally Available version of MySQL. This session will give a brief introduction to MySQL 8.0 and help you upgrade from older versions, understand what utilities are available to make the process smoother and also understand what you need to bear in mind with the new version and considerations for possible behaviour changes and solutions. It really is a simple process.
MySQL can now be used as a document store, combining the flexibility of the document store model with the power of the relational model. You’ll understand why you’ll be able to choose MySQL for your Relational AND Document Store needs, avoiding significant trade-offs and being forced into choosing multiple solutions.
MySQL can now be used as a document store, combining the flexibility of the document store model with the power of the relational model. You’ll understand why you’ll be able to choose MySQL for your Relational AND Document Store needs, avoiding significant trade-offs and being forced into choosing multiple solutions.
The Software as a Service or SaaS market is large and growing. Demands of 24/7 availability, high performance, back-up, security, affordability, scalability, manageability, audit ability and easy integration when delivering your product and or service to your customers, are business challenges which we will address in this presentation. By demonstrating MySQL’s proven ability in this area, we will show how we can help new and seasoned SaaS vendors.
Starting with MySQL 5.7.12 we introduced a new plugin to use MySQL as a Document Store. This presentation gives an overview of current features and plans going forward.
MySQL Day Paris 2016 - MySQL as a Document StoreOlivier DASINI
MySQL Day Paris 2016 - MySQL as a Document Store
✔ Built on Proven SQL/InnoDB/Replication
✔ Schema-less/Relational/Hybrid
✔ ACID/Transactions
✔ CRUD/JSON/Documents
✔ Modern Dev API
✔ Modern/Efficient Protocol
✔ SQL Queries/Analytics over JSON Documents
✔ Transparent and Easy HA/Scaling/Sharding
MySQL 5.7 is GA. Here is the news about our NoSQL features in MySQL and MySQL Cluster, with a lot of emphasize on the new JSON features that make MySQL suitable as a document store.
MySQL offers several new functionality to enhance security and make MySQL suitable for critical environments. Several add-ons help achieving regulatory compliance like PCI-DSS. Here is an overview of these features.
"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007eLiberatica
This is a presentation held at eLiberatica 2007.
http://www.eliberatica.ro/2007/
One of the biggest events of its kind in Eastern Europe, eLiberatica brings community leaders from around the world to discuss about the hottest topics in FLOSS movement, demonstrating the advantages of adopting, using and developing Open Source and Free Software solutions.
The eLiberatica organizational committee together with our speakers and guests, have graciously allowed media representatives and all attendees to photograph, videotape and otherwise record their sessions, on the condition that the photos, videos and recordings are licensed under the Creative Commons Share-Alike 3.0 License.
The Software as a Service or SaaS market is large and growing. Demands of 24/7 availability, high performance, back-up, security, affordability, scalability, manageability, audit ability and easy integration when delivering your product and or service to your customers, are business challenges which we will address in this presentation. By demonstrating MySQL’s proven ability in this area, we will show how we can help new and seasoned SaaS vendors.
Starting with MySQL 5.7.12 we introduced a new plugin to use MySQL as a Document Store. This presentation gives an overview of current features and plans going forward.
MySQL Day Paris 2016 - MySQL as a Document StoreOlivier DASINI
MySQL Day Paris 2016 - MySQL as a Document Store
✔ Built on Proven SQL/InnoDB/Replication
✔ Schema-less/Relational/Hybrid
✔ ACID/Transactions
✔ CRUD/JSON/Documents
✔ Modern Dev API
✔ Modern/Efficient Protocol
✔ SQL Queries/Analytics over JSON Documents
✔ Transparent and Easy HA/Scaling/Sharding
MySQL 5.7 is GA. Here is the news about our NoSQL features in MySQL and MySQL Cluster, with a lot of emphasize on the new JSON features that make MySQL suitable as a document store.
MySQL offers several new functionality to enhance security and make MySQL suitable for critical environments. Several add-ons help achieving regulatory compliance like PCI-DSS. Here is an overview of these features.
"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007eLiberatica
This is a presentation held at eLiberatica 2007.
http://www.eliberatica.ro/2007/
One of the biggest events of its kind in Eastern Europe, eLiberatica brings community leaders from around the world to discuss about the hottest topics in FLOSS movement, demonstrating the advantages of adopting, using and developing Open Source and Free Software solutions.
The eLiberatica organizational committee together with our speakers and guests, have graciously allowed media representatives and all attendees to photograph, videotape and otherwise record their sessions, on the condition that the photos, videos and recordings are licensed under the Creative Commons Share-Alike 3.0 License.
MySQL powers the most demanding Web, E-commerce, SaaS and Online Transaction Processing (OLTP) applications.
It is a fully integrated transaction-safe, ACID compliant database with full commit, rollback, crash recovery and row level locking capabilities.
MySQL delivers the ease of use, scalability, and performance to power Facebook, Google, Twitter, Uber, Booking.com and many more...
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!ScaleBase
Home-grown sharding is hard - REALLY HARD! ScaleBase scales-out MySQL, delivering all the benefits of MySQL sharding, with NONE of the sharding headaches. This webinar explains: MySQL scale-out without embedding code and re-writing apps, Successful sharding on Amazon and private clouds, Single vs. multiple shards per server, Eliminating data silos, Creating a redundant, fault tolerant architecture with no single-point-of-failure, Re-balancing and splitting shards
Slides presented at Great Indian Developer Summit 2016 at the session MySQL: What's new on April 29 2016.
Contains information about the new MySQL Document Store released in April 2016.
MySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdfAlkin Tezuysal
MySQL is still hot, with Percona XtraDB Cluster (PXC) and MariaDB Server. Welcome back post-pandemic to see what is on offer in the current ecosystem.
Did you know that Amazon RDS now uses semi-sync replication rather than DRBD for multi-AZ deployments? Did you know that Galera Cluster for MySQL 8 is much more efficient with CLONE SST rather than using the xtrabackup method for SST? Did you know that Percona Server continues to extend MyRocks? Did you know that MariaDB Server has more Oracle syntax compatibility? This and more will be covered in the session, while short and quick, should leave you wandering to discover new features for production.
FOSSASIA 2015 - 10 Features your developers are missing when stuck with Propr...Ashnikbiz
Ashnik Database Solution Architect, Sameer Kumar, an Open Source evangelist presented at FOSSASIA 2015 about the features of open source database like PostgreSQL which are missed by developers stuck on proprietary databases.
10 Features you would love as an Open Source developer!
- New JSON Datatype
- Vast set of datatypes supported
- Rich support for foreign Data Wrap
- User Defined Operators
- User Defined Extensions
- Filter Based Indexes or Partial Indexes
- Granular control of parameters at User, Database, Connection or Transaction Level
- Use of indexes to get statistics
- JDBC API for COPY -Command
- Full Text Search
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL SupportMysql User Camp
This slide was presented at Mysql User Camp Event on 20-June-14 at Oracle bangalore. This presentation gives a good insight about New Features in Mysql 5.7 DMR 4 and Nosql Support in Mysql.
Going thru the era of IoT that involves lots more and much bigger data, we need a faster database. MySQL 5.7 gives you 3x speed of its predecessor and able to reach 1.6m qps on our select benchmark.
MySQL Backup
Backup is one of the most critical tasks of database administration. In this webinar we will show you which options are available to run Backups of your MySQL databases and how different backup architectures support backups with minimal impact to ongoing operation of your application. Learn about online backups, quick restores, backup to cloud storage and encryption of backup data. All important features to run a professional, secure and performance backup environment.
MySQL 5.6, news in 5.7 and our HA optionsTed Wennmark
Join us for this free MySQL Tech Tour to learn straight from the source how you can benefit from Oracle’s latest MySQL innovations. Our technical experts will help you understand how to take advantage of the wide range of new features and enhancements available in MySQL Fabric, MySQL 5.6, MySQL Cluster and other MySQL solutions. They will share tips & tricks to help you get the most of your database. You will also discover what’s coming next in MySQL 5.7.
Our (Olle from King and myself) session at OOW2014 (MySQL Central).
You will learn about the setup at King and also have a brief introduction to scaling MySQL.
My MySQL and NoSQL presentation from the NoSQL Search event in Copenhagen: http://nosqlroadshow.com/nosql-cph-2013/speaker/Ted+Wennmark
MySQL offers solutions to implement NoSQL concepts like auto-sharding, key-value access or asynchronous operations. This adds all known solutions from the SQL world to the NoSQL space.
The combined approach of SQL and NoSQL gives developers the choice to select whatever features from both worlds they need.
In this talk we take a deeper look at key-value access to MySQL and MySQL Cluster, auto-sharding and scalability of MySQL Cluster, mapping of schemaless key value access to a relational data model and the performance of NoSQL access to MySQL.
Show drafts
volume_up
Empowering the Data Analytics Ecosystem: A Laser Focus on Value
The data analytics ecosystem thrives when every component functions at its peak, unlocking the true potential of data. Here's a laser focus on key areas for an empowered ecosystem:
1. Democratize Access, Not Data:
Granular Access Controls: Provide users with self-service tools tailored to their specific needs, preventing data overload and misuse.
Data Catalogs: Implement robust data catalogs for easy discovery and understanding of available data sources.
2. Foster Collaboration with Clear Roles:
Data Mesh Architecture: Break down data silos by creating a distributed data ownership model with clear ownership and responsibilities.
Collaborative Workspaces: Utilize interactive platforms where data scientists, analysts, and domain experts can work seamlessly together.
3. Leverage Advanced Analytics Strategically:
AI-powered Automation: Automate repetitive tasks like data cleaning and feature engineering, freeing up data talent for higher-level analysis.
Right-Tool Selection: Strategically choose the most effective advanced analytics techniques (e.g., AI, ML) based on specific business problems.
4. Prioritize Data Quality with Automation:
Automated Data Validation: Implement automated data quality checks to identify and rectify errors at the source, minimizing downstream issues.
Data Lineage Tracking: Track the flow of data throughout the ecosystem, ensuring transparency and facilitating root cause analysis for errors.
5. Cultivate a Data-Driven Mindset:
Metrics-Driven Performance Management: Align KPIs and performance metrics with data-driven insights to ensure actionable decision making.
Data Storytelling Workshops: Equip stakeholders with the skills to translate complex data findings into compelling narratives that drive action.
Benefits of a Precise Ecosystem:
Sharpened Focus: Precise access and clear roles ensure everyone works with the most relevant data, maximizing efficiency.
Actionable Insights: Strategic analytics and automated quality checks lead to more reliable and actionable data insights.
Continuous Improvement: Data-driven performance management fosters a culture of learning and continuous improvement.
Sustainable Growth: Empowered by data, organizations can make informed decisions to drive sustainable growth and innovation.
By focusing on these precise actions, organizations can create an empowered data analytics ecosystem that delivers real value by driving data-driven decisions and maximizing the return on their data investment.
Techniques to optimize the pagerank algorithm usually fall in two categories. One is to try reducing the work per iteration, and the other is to try reducing the number of iterations. These goals are often at odds with one another. Skipping computation on vertices which have already converged has the potential to save iteration time. Skipping in-identical vertices, with the same in-links, helps reduce duplicate computations and thus could help reduce iteration time. Road networks often have chains which can be short-circuited before pagerank computation to improve performance. Final ranks of chain nodes can be easily calculated. This could reduce both the iteration time, and the number of iterations. If a graph has no dangling nodes, pagerank of each strongly connected component can be computed in topological order. This could help reduce the iteration time, no. of iterations, and also enable multi-iteration concurrency in pagerank computation. The combination of all of the above methods is the STICD algorithm. [sticd] For dynamic graphs, unchanged components whose ranks are unaffected can be skipped altogether.
1. Ted Wennmark
MySQL Solution Architect EMEA
Blog : http://mysql-nordic.blogspot.com/
Git projects : https://github.com/wwwted
LinkedIn : https://www.linkedin.com/in/tedwennmark/
MySQL 8.0
Upgrading to MySQL 8.0
1
2. 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, timing, and pricing of any features or functionality described for
Oracle’s products may change and remains at the sole discretion of Oracle Corporation.
2
3. • Long time MySQL user
– Started developing apps using MySQL over 20 years back
– Worked as MySQL DBA, Trainer and consultant the past
• MySQL Prinicipal Solution Architect at Oracle
• Work with normal MySQL but have focuse on distributed
databases with NDB Cluster.
• My workshops at Github: https://github.com/wwwted/
• Let’s stay in touch:
– https://www.linkedin.com/in/tedwennmark/
• Join us on slack: https://lefred.be/mysql-community-on-slack/
Ted Wennmark
3
5. MySQL is the most popular open-source database!
DB-Engines 2020
Database Ranking
5
6. MySQL is the most popular database!
Stack Overflow Developer Survey 2020
Developer Survey Results
6
7. - 3x Better Performance
- Replication Enhancements
- Optimizer Cost Model
- JSON Support
- Improved Security
- Sys & Performance Schema
- GIS
MySQL 5.7
MySQL HA Cluster
- MySQL Group Replication
- MySQL ReplicaSet
- MySQL Router
- MySQL Shell
MySQL 8.0
- 2x Better Performance
- NoSQL Document Store
- JSON
- CTEs
- Window Functions
- Data Dictionary
- InnoDB
- Roles
- Unicode
- GIS
2 Years in Development
400+ Worklogs
5000+ Bugs Fixed
500 New Tests
GA
MySQL Innovation: 5.7 -> 8.0
7
8. MySQL 8: What’s new!
DBA’s
Transactional (InnoDB) Data Dictionary
Persistent runtime configuration changes (SET PERSIST)
Auto-increment counter value will now persist across server restarts!
Indexing of PS tables
SQL Roles (collection of privileges)
Developers
Common Table Expressions
Windows Functions
Avoid locking with: SELECT ... FOR UPDATE [SKIP LOCKED | NOWAIT]
More JSON and GIS functionality
8
9. • New! Support for the latest Unicode 9.0
• Per-country collation rules
– Accent Sensitive
– Case Sensitive
• UTF8MB4 as the default character set
– Project started in MySQL 5.7
– Many improvements to reduce performance impact
– The new default character set/collation: utf8mb4/utf8mb4_0900_ai_ci
MySQL 8: UTF8
9
10. MySQL 8: New Data Dictionary
• Metadata stored in InnoDB
– From files to a proven transactional storage engine
– System tables moved from MyISAM to InnoDB
• One source of truth
– One common data dictionary
• Atomic, crash safe DDL
– CREATE/DROP USER <u1, u2, u3>, DROP TABLE <t1, t2, t3>,...
10
11. MySQL 8: Alter Table - Instant Add Column
• Contribution from Tencent
– Only changes metadata
– No copying of data
– Smaller final data size
• ALTER TABLE … ADD COLUMN c, ALGORITHM = INSTANT (INPLACE, COPY)
• Supports DYNAMIC/COMPACT/REDUNDANT row formats
• Enabled by default
11
12. Feature Request
from DBAs
MySQL 8: Roles
• Improving MySQL Access Controls
• Easier to manage user and applications privileges
• Users can be assigned multiple roles
• SET DEFAULT ROLE to users or use SET ROLE during runtime
• Mandatory roles for all users can be configured on a server level
• Can export the role graph in GraphML
– SELECT ROLES_GRAPHML() into outfile '/tmp/test_roles.graphml';
– https://lefred.be/content/mysql-8-0-roles-and-graphml/
12
13. http://lefred.be/content/how-to-safely-upgrade-to-mysql-8-0/
MySQL 8 Shell: Upgrade Checker
Feature Request
from DBAs
• Quick and Easy MySQL Shell Utility
– JavaScript or Python
– MySQL 5.7 and onwards
– New util class
mysqlsh> util.checkForServerUpgade();
• Identifies potential issues for upgrade
• Recommends Fixes:
– Schema, configuration, tables, reserved keywords, use of
deprecated or removed features or data- types and much
more
13
14. Performance
2x Faster than MySQL 5.7 for RO and RW @scale
• Scaling Read/Write Loads
– Re-designing how InnoDB writes to Redo log
• Utilizing IO Capacity
– Removing file system mutex
• High Contention Loads
– Contention Aware Transaction Scheduling
– CATS over FIFO
• Resource Groups
– Thread–CPU mapping can be managed
• UTF8MB4
• Partial JSON/BLOB update
• Information Schema
• Performance Schema
• Cost Model (mem/disk aware)
14
15. SELECT thread_id, object_name, index_name, lock_type, lock_mode, lock_data
FROM performance_schema.data_locks WHERE object_name = 'seats';
+-----------+-------------+------------+-----------+-----------+-----------+
| thread_id | object_name | index_name | lock_type | lock_mode | lock_data |
+-----------+-------------+------------+-----------+-----------+-----------+
| 33 | seats | NULL | TABLE | IX | NULL |
| 33 | seats | PRIMARY | RECORD | X | 3, 5 |
| 33 | seats | PRIMARY | RECORD | X | 3, 6 |
| 33 | seats | PRIMARY | RECORD | X | 4, 5 |
| 33 | seats | PRIMARY | RECORD | X | 4, 6 |
+-----------+-------------+------------+-----------+-----------+-----------+
5 rows in set (0.00 sec)
New! System Table Shows Schema Data Locks
Feature Request
from DBAs
15
16. Production Workload #1
Production Workload #2
4x Improvement
on single-threaded!
MySQL 8: Parallel Replication
http://jfg-mysql.blogspot.se/2018/01/an-update-on-write-set-parallel-replication-bug-fix-in-mysql-8-0.html
• New! Improved Replication Throughput
• New! Improved Parallelism on slave,
independent of Master “load”
• Write-set extraction from Group
Replication drives multi-threaded
parallel slave performance more than
ever
• No more slave lag
16
17. MySQL GIS: Spatial Reference Systems (SRS) Support
”Matching or Exceeding PostgreSQL GIS Feature Set”
• MySQL 5.7
– The world is flat (SRS ID = 0)
– The word is infinite
– Axes are unitless
– Axes are orthogonal
– Axis order is irrelevant
– Axis direction is irrelevant
• MySQL 8.0
– The world can be flat or a ellipsoid
– Geographic coordinate system wrapes around
– Axes have units
– Geographic axes are not orthogonal
– Geographic axis order matter
– Axis direction my be relevant
17
20. MySQL 8.0 for ANALYTICS: CTEs & Window Functions
• New! Common Table Expression (WITH clause)
– Non-recursive
– Recursive
– Used for hierarchy traversal
• New! Window Functions
– Aggregation, ranking, analytics
– Used for analytics and reporting
20
21. MySQL 8.0: Invisible Indexes
• Indexes are “hidden” to the MySQL Optimizer
– Not the same as “disabled indexes”
– Contents are fully up to date and maintained by DML
• Use cases:
– Soft Delete (Recycle Bin)
– Staged Rollout
– Test
21
22. New Release Model: Continuous Delivery Model
• Starting with MySQL 8.0.11 we are changing our release model:
– Main driver is to release new features quicker
– More testing before releasing from our side
– New features disabled by default (if possible)
– No large re-factoring of code within CDM
• What does this means for minor upgrades:
– We are releasing new functionality and removing/deprecating unwanted features.
– Read our relase notes, pay extra attention to sections ” Deprecation and Removal Notes” and ”
Functionality Added or Changed”
– Treat minor upgrades ”almost” as a Major upgrade!!
22
23. New Release Model: Continuous Delivery Model ”My favorites”
• MySQL 8.0.11 (2018-04-19)
– LOCK INSTANCE FOR BACKUP
– RESTART SQL Statement
• MySQL 8.0.12 (2018-07-27)
– ”ALTER TABLE algorithm=INSTANT”
• MySQL 8.0.13 (2018-10-12)
– Functional indexes
• MySQL 8.0.14 (2019-01-21)
– Consistent reads in InnoDB Cluster
23
• MySQL 8.0.19 (2020-01-13)
– InnoDB ReplicaSet
• MySQL 8.0.20 (2020-04-27)
– Binlog Compression
– Support for hash outer, anti and
semi join
• MySQL 8.0.21 (2019-10-14)
– Disabling/enabling the Innodb
redo log dynamically
– Improved default values for
InnoDB Cluster and tagging
• MySQL 8.0.16 (2019-04-25)
– SQL: CHECK Constraints
– mysql_upgrade deprecated
• MySQL 8.0.17 (2019-07-22)
– MySQL Clone plugin
– Encrypted binary logs
• MySQL 8.0.18 (2019-10-14)
– EXPLAIN ANALYZE
– HASH joins
24. New Release Model: Continuous Delivery Model ”All new features”
https://mysqlserverteam.com/the-mysql-8-0-12-maintenance-release-is-generally-available/
https://mysqlserverteam.com/the-mysql-8-0-13-maintenance-release-is-generally-available/
https://mysqlserverteam.com/the-mysql-8-0-14-maintenance-release-is-generally-available/
https://mysqlserverteam.com/the-mysql-8-0-16-maintenance-release-is-generally-available/
https://mysqlserverteam.com/the-mysql-8-0-17-maintenance-release-is-generally-available/
https://mysqlserverteam.com/the-mysql-8-0-18-maintenance-release-is-generally-available/
https://mysqlserverteam.com/the-mysql-8-0-19-maintenance-release-is-generally-available/
https://mysqlserverteam.com/the-mysql-8-0-20-maintenance-release-is-generally-available/
https://mysqlserverteam.com/the-mysql-8-0-21-maintenance-release-is-generally-available/
24
26. Why upgrade?
• Performance/Scalability improvements
• New features in MySQL 8
• Stay on fully supported release
• Security improvements
• Regulatory compliance
26
27. Performance/Scalability
• Newer MySQL version scales better:
– MySQL 5.1 scales to ~4 cores
– MySQL 5.6 scales to ~36 threads (cores)
– MySQL 5.7 scales to ~64 threads (32 Core-HT)
– MySQL 8.0 scales to ~100 threads (test on 48 Cores-HT intel Skylake)
• Improvements in optimizer
– Better query plans with MRR, BKA.
– More work in storage engine with ICP
– Cost model can be tuned in 5.7 and in MySQL 8 Optimizer Takes Data Buffering into Account
– HASH JOIN in MySQL 8.0.18
– Histograms in MySQL 8.0
https://www.mysql.com/why-mysql/benchmarks/27
28. 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 2019 Indefinite
MySQL 5.6 Feb 2013 Feb 2019 Feb 2021 Indefinite
MySQL 5.7 Oct 2015 Oct 2020 Oct 2023 Indefinite
MySQL 8.0 Apr 2018 Apr 2023 Apr 2026 Indefinite
http://www.oracle.com/us/support/library/lifetime-support-technology-069183.pdf
28
29. MySQL Security
• OpenSSL default in MySQL 8.0
• SQL ROLES added in MySQL 8.0.
• SSL enabled by default.
• Stronger passwords and validation of password quality.
• MySQL Enterprise Edition:
– MySQL Audit
– MySQL Monitor/Backup
– MySQL Firewall
– MySQL Encryption/TDE
– MySQL Data Masking
29
31. MySQL Upgrade – Supported Paths
• All minor upgrades like 8.0.11 to 8.0.12 or doing a jump like 8.0.11 to 8.0.13
is supported.
• Upgrading one major (5.7 - 8.0) release level is supported. It’s
recommended upgrading to the latest 5.7 release before moving to 8.0.
• Doing long-jumps (5.6 – 8.0) is supported if you upgrade one release
level at a time.
• Direct upgrades that skip a release level (for example, upgrading directly
from MySQL 5.6 to 8.0) is not recommended nor supported.
31
32. MySQL Upgrade – Before you start I
• Review the “Release Notes” for target MySQL version, especially sections:
“Deprecation and Removal Notes”
“Functionality Added or Changed”
• Review the manual page on upgrading, take special care of sections covering:
“Changes in MySQL 8.0”
“Preparing Your Installation for Upgrade”
• Create a PLAN for your upgrade/downgrade.
• Create a BACKUP before starting upgrade.
http://dev.mysql.com/doc/refman/8.0/en/upgrading.html
https://mysqlserverteam.com/upgrading-to-mysql-8-0-here-is-what-you-need-to-know/
32
33. MySQL Upgrade – Before you start II
• Using MySQL Shell 8.0 we can check the status of the 5.7 server to be upgraded.
• Run MySQL Shell before upgrade:
– util.checkForServerUpgrade(“user@127.0.0.1:3306”, {"password":”secret", "targetVersion":"8.0.19",
"configPath":"/etc/my.cnf"})
– mysqlsh -- util check-for-server-upgrade user:password@127.0.0.1:3306 --target-version=8.0.19 --output-
format=JSON --config-path=/etc/my.cnf
• MySQL Shell will identify if you are using any reserved keywords, removed datatypes or
if some parameters in your configuration have new defaults and much more.
• Upgrade checker will not identify problems like GIS changes or deprecated MySQL
functions used by your application.
33
35. MySQL Upgrade – Remember!
• Performance/Scalability monitoring and testing (before and after).
• Advanced features (sp, functions or views).
• Do you need to consider replication between different versions of MySQL.
• Changes in default values between versions (sql_mode).
• Look out for statements creating warnings/errors (before upgrade).
• New optimizer features causing query plan changes.
• Monitor resource usage (iostat, top, vmstat etc).
35
36. MySQL Upgrade – In-place Upgrade
1. Do all necessary preparations/plans as explained earlier.
2. Do a graceful shutdown of MySQL (innodb_fast_shutdown=0)
Also look out for any existing XA transactions before upgrade.
3. Do upgrade, replace the old binaries with the new ones.
4. Start MySQL Server using new binaries.
5. Run mysql_upgrade binary to upgrade internal mysql repository.
(as of MySQL 8.0.16 this not needed)
6. Verify that all is working as expected!
https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html#upgrade-procedure-inplace
36
37. MySQL Upgrade – Logical Upgrade
1. Do all necessary preparations/plans as explained earlier.
2. Do a dump of only the user databases/schemas (skipping the mysql
system schema, remember stored procedures, views and functions)
3. Do a clean installation of new MySQL version (remember to migrate
important my.cnf options and your users (mysqlpump)).
4. Load the dump files into the new MySQL server instance.
5. Verify that all is working as expected!
https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html#upgrade-procedure-logical
http://mysqlserverteam.com/upgrading-directly-from-mysql-5-0-to-5-7-with-mysqldump/
37
38. MySQL Upgrade – Using Replication to Upgrade with minimal downtime
1. Do all necessary preparations/plans as explained
earlier.
2. Restore backup from production (5.7) database to
new replica server (8.0).
3. Start replication from source (5.7) to replica (8.0).
4. Once replica server has caught up with source.
5. Run some tests on replica (8.0)
6. Change application to connect to replica (8.0).
MySQL 5.7
MySQL
8.0
Application
Replication
https://dev.mysql.com/doc/refman/8.0/en/replication.html
38
40. MySQL Upgrade – Solving Regression Problems
• Explain is your friend!
– Optimizer_switch can help get back old query plans for slow queries.
• Monitor resources/MySQL before/after to spot changes.
– Without proper monitoring you have little chance to find root cause of problem.
• Did you change more than just MySQL version?
– Normally we see people refresh HW/OS at the same time which creates more sources for regressions.
• Use PERFORMANCE_SCHEMA and SYS schema to spot problems.
40
41. Upgrading from older MySQL versions to MySQL 8.0?
Important changes in MySQL 5.6
• Need at least version 5.1.20 of Connector/J (due to retire of “SET OPTION”).
• InnoDB “Files per table” now default.
• The Query Cache is disabled by default.
• 8 new reserved key words have been defined (“get” and “partition”).
• New data format of TIMESTAMP and DATETIME (microseconds).
• Password on command line causes warnings (problematic for scripts).
• New optimizer features may cause different query plans.
• Old password are not allowed by default.
41
42. Upgrading from older MySQL versions to MySQL 8.0?
Important changes in MySQL 5.7
• Old password format not allowed.
• innodb_strict_mode is “ON”.
• sql_mode option “NO_AUTO_CREATE_USER, STRICT_TRANS_TABLES,
ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, NO_ZERO_IN_DATE” is now
default.
• Changes to optimizer_switch, may cause changed query plans!
• Remove of IGNORE for ALTER TABLE and INSERT DELAYED.
• mysql_install_db script removed (now part of mysql --initialize).
• MySQL installation much more secure by default.
42
43. Important changes in MySQL 8.0
• Query Cache was removed.
• No support for non-native partitioning (no partitioning for MyISAM).
• No foreign key constraint names longer than 64 characters.
• Removal of some combined sql_mode definitions.
• More reserved keywords (groups, member, admin, system) (Application impact).
• New default character set and collation (utf8mb4) (Application impact).
• New default authentication plug-in (Application impact).
• Binary log enabled by default (log_bin = ON).
• GIS have changed (Application impact).
43
44. New release model with MySQL 8.0: Continuous Delivery Model
Minor upgrades
• Important to treat MySQL 8.0 minor upgrades the same way as major upgrades.
• MySQL 8.0 minor releases can change default values and add, changes or deprecate
functionality.
• Follow best practices by reading release notes for minor upgrades, especially sections:
“Deprecation and Removal Notes”
“Functionality Added or Changed”
• Use MySQL Shell Upgrade checker to spot upgrade problems.
• Take backup before and after upgrade of minor releases.
• Downgrade to previous minor release is only supported via restore from backup.
“Cannot boot server version 80016 on data directory built by version 80017. Downgrade is not supported”
• Use matching versions of backup software (MySQL 8.0.19 and MEB 8.0.19).
44
46. Why MySQL Enterprise Edition?
Insure Your Deployments
Get the Best Results
Delight Customers
Improve
Performance &
Scalability
Enhance Agility &
Productivity
Reduce TCO
Mitigate
Risks
Get
Immediate
Help if/when
Needed
Increase
Customer
Satisfaction
46
47. Management
Tools
Advanced Features Support
•Scalability
•High Availability
•Security
•Encryption + TDE
•Data Masking
•Firewall
•Monitoring
•Backup
•Development
•Administration
•Migration
• Technical Support
• Consultative Support
• Oracle Certifications
MySQL Enterprise Edition
47
48. MySQL Enterprise Backup
• Online, non-locking backup and recovery
– Complete MySQL instance backup (data and config)
– Partial backup and restore
• Direct Cloud storage backups
– Oracle Storage Cloud, S3, etc.
• Incremental backups
• Point-in-time recovery
• Advanced compressed and encryption
• Backup to tape (SBT)
• Cross-Platform (Windows, Linux, Unix)
48
49. MySQL Enterprise Support
• Largest MySQL engineering and support organization
• Backed by the MySQL developers
• World-class support, in 29 languages
• Hot fixes & maintenance releases
• 24x7x365
• Unlimited incidents
• Consultative support
• Global scale and reach
Get immediate help for any MySQL
issue, plus expert advice
49
50. MySQL Enterprise Consultative Support
• Remote troubleshooting
• Replication review
• Partitioning review
• Schema review
• Query review
• Performance tuning
• ...and more
Get immediate help for any MySQL
issue, plus expert advice
50
51. More information
• http://dev.mysql.com/doc/refman/8.0/en/upgrading.html
• 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/
• http://lefred.be/content/how-to-safely-upgrade-to-mysql-8-0/
• http://lefred.be/content/migrating-to-mysql-8-0-without-breaking-old-application/
• https://saveriomiroddi.github.io/Pre-fosdem-talk-upgrading-from-mysql-5.7-to-8.0/
• https://dev.mysql.com/doc/refman/8.0/en/
51