Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Advanced MySQL 8
Advanced MySQL 8

Advanced MySQL 8: Discover the full potential of MySQL and ensure high performance of your database

Arrow left icon
Profile Icon Vanier Profile Icon Malepati Profile Icon Shah
Arrow right icon
€17.99 €26.99
Full star icon Full star icon Half star icon Empty star icon Empty star icon 2.8 (5 Ratings)
eBook Jan 2019 286 pages 1st Edition
eBook
€17.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Vanier Profile Icon Malepati Profile Icon Shah
Arrow right icon
€17.99 €26.99
Full star icon Full star icon Half star icon Empty star icon Empty star icon 2.8 (5 Ratings)
eBook Jan 2019 286 pages 1st Edition
eBook
€17.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€17.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Table of content icon View table of contents Preview book icon Preview Book

Advanced MySQL 8

MySQL 8's New Features

In this chapter, we will not only cover all the new exciting features of MySQL 8.0, but we will also review its deprecated or removed features as well, and learn about its functionality.

The following are the topics that we will discuss:

  • Global data dictionary
  • MySQL support roles and history
  • Creation and management of resource groups and permissions
  • InnoDB enhancements
  • JSON functionality enhancements
  • Invisible indexes from MySQL optimizer
  • Features deprecated in MySQL 8.0
  • A quick look at the features removed from MySQL 8.0
  • A review of the chapter

Now let's take a look at the main reasons Oracle has gone so far with its development of the global data dictionary in MySQL 8.0.

Global data dictionary

In an optimization strategy, to be able to obtain an ideal optimization of MySQL, it is essential to have an understanding of the operation in the backend, to be able to make the right adjustments.

It's like when you bring your vehicle to the garage to check an abnormal sound. A competent mechanic will be able to give you good recommendations and do the right thing to correct the situation because he knows how the engine works, and it is the same with MySQL and optimization.

MySQL, like any other database, needs somewhere to store its schema names, table definitions, and other metadata; these are most commonly stored in a combination of different locations, including .FRL, .PAR, .OPT, .TRN, and .TRG files. This has gradually become a bottleneck in various contexts over time.

A visual example of files external to MySQL tables can be seen in the following...

MySQL 8's support roles and history

In MySQL 8, there is one new feature that is well worth a special mention. Right on the MySQL server, you can now create roles, specify their privileges, and assign them to users. So, from now on, it will be an easy task for you because you will not need to remember which permissions a team X programmer needs, and whether a team QA must have Z privileges, and so on.

Let's take a concrete example:

To create a role, just run following command:

CREATE ROLE 'devops_developer', 'app_read', 'app_write';

Now give privileges to the role:

GRANT SELECT ON app_db.* TO 'app_read';

And, finally, share this role with a user:

GRANT 'app_read' TO 'read_username1'@'localhost', 'read_username2'@'localhost';

The other options available are as follows:

  • Mandatory...

MySQL 8 supports the creation and management of resource groups and permissions

A new feature that Oracle has added to MySQL 8.0 is the creation and management of resource groups that can assign threads to particular groups so that these threads run according to the resources available to the group.

Group attributes allow you to control resources to vary resource consumption by group threads as needed. DBAs can adapt them to different workloads.

Currently, the use of the CPU is a manageable resource—yes, you read it right, manageable; this use is represented by the concept of virtual CPU or CPU cores. At start-up, an assessment is carried out by the MySQL server as to the number of available virtual processors. DBAs, depending on their privilege, can then associate them with resource groups and assign threads.

This means that you can assign a group 2 virtual CPU to application...

InnoDB enhancements

In MySQL 8.0, Oracle has improved or added features; let's look at these.

This step in MySQL is something many DBAs or developers are not aware of, because it is not something that we check everyday but it is important; we're talking about the maximum value of the auto-increment counter, which is registered in the redo log and changes each time during each checkpoint.

In addition to being saved in a series of private tables and visible only by MySQL, the auto-increment counter has been improved so it is more persistent during a restart of MySQL. This means that during a reboot, the new value will persist and not change as in previous releases.

Another improvement is the dynamic configuration of Innodb_deadlock_detect, which can be used to disable or enable this variable, which normally if it is active can affect the performance of MySQL in the case...

JSON enhancements functionalities

Oracle has been forced over time to adopt the new NoSQL trend because of the competition and also the fact that the concept of storage type document as JSON came to be much more practical at the management level; for some companies that have architectures such as big data, this became more of a constraint at the application level.

For these reasons, Oracle introduced for the first time in MySQL 5.7.8, the JSON data type, which is a type of specialized binary column, similar to a blob, but with additional features to optimize storage and recover the values of a JSON type column.

In the new version of MySQL 8.0, Oracle has added great features such as automatic validation, JSON document normalization, and automatic loading of values. There is also a restriction that must be taken into consideration, such as, for example, JSON columns that cannot...

Invisible indexes from MySQL optimizer

You read that correctly—indexes can now be made invisible in MySQL 8.0!

From a performance or optimization point of view, this new MySQL 8.0 option is appreciated because you can essentially disable an index before deleting it. When you create an invisible index, it is always maintained normally, but the optimizer will not see it.

In other words, if you're not sure whether you need an index, you can mark it as invisible and the MySQL optimizer will not use it. After monitoring your server and monitoring performance, you can decide to reactivate it if you think that will result in improved performance.

As you probably already know, when the query optimizer can find an action plan to exploit them to their fullest, indexes can be of great assistance. They reduce execution time and improve the performance of your queries. However...

Features deprecated in MySQL 8.0

Like all new MySQL versions, the following features are considered obsolete in MySQL 8.0, and may be removed in a future new release. When alternatives are displayed, applications must be updated to use them.

Since MySQL 8.0.4, the validate_password plugin has been re-enabled for use in the server component framework, and although it is still available, there are plans for it to be removed from future versions of MySQL.

The ALTER TABLESPACE and DROP TABLESPACE ENGINE clause will be removed from future releases.

The function JSON_MERGE () is removed from MySQL 8.0.3. You should use JSON_MERGE_PRESERVE () instead.

A quick look at the features removed from MySQL 8.0

It is important to note that the following items are obsolete and have been removed in MySQL 8.0. When messages are displayed for alternatives, applications must be updated to use them and the following is only a short list of all removed items. I invite you to visit MySQL website for more details:

  • The information_schema_stats configuration has been replaced by information_schema_stats_expiry.
  • InnoDB system views have been replaced:
  • The query cache has been removed, including FLUSH QUERY CACHE and RESET QUERY CACHE.
  • Two MySQL storage engines currently provide native partition support: InnoDB and NDB. Of these, only InnoDB is supported by MySQL 8.0. Any attempt to create partitioned tables in MySQL 8.0 using another storage engine will fail.
  • In MySQL 8.0, the data_locks table and sys schema views contain separate schema name...

Summary

In this chapter, we have covered all the new exciting features of MySQL 8.0 and their functionalities, and reviewed deprecated and removed features. We have seen the main reasons why Oracle has gone so far with its development of the global data dictionary in MySQL 8.0.

We covered MySQL support roles and history; we covered one new feature on the MySQL server, in which you can now create roles, specify their privileges, and assign them to users. We learned that a new feature that Oracle has added to MySQL 8.0 is the creation and management of resource groups; we can assign threads to particular groups so that these threads run according to the resources available to the group. We also looked at enhancements in InnoDB and JSON, and we learned about invisible indexes from MySQL's optimizer. Lastly, we looked at features that have been deprecated and removed from MySQL...

Left arrow icon Right arrow icon

Key benefits

  • Explore the new and advanced features of MySQL 8.0
  • Use advanced techniques to optimize MySQL performance
  • Create MySQL-based applications for your enterprise with the help of practical examples

Description

Advanced MySQL 8 teaches you to enhance your existing database infrastructure and build various tools to improve your enterprise applications and overall website performance. The book starts with the new and exciting MySQL 8.0 features and how to utilize them for maximum efficiency. As you make your way through the chapters, you will learn to optimize MySQL performance using indexes and advanced data query techniques for large queries. You will also discover MySQL Server 8.0 settings and work with the MySQL data dictionary to boost the performance of your database. In the concluding chapters, you will cover MySQL 8.0 Group Replication, which will enable you to create elastic, highly available, and fault-tolerant replication topologies. You will also explore backup and recovery techniques for your databases and understand important tips and tricks to help your critical data reach its full potential. By the end of this book, you’ll have learned about new MySQL 8.0 security features that allow a database administrator (DBA) to simplify user management and increase the security of their multi-user environments.

Who is this book for?

Advanced MySQL 8 is for database administrators, data architects, and database developers who want to dive deeper into building advanced database applications in the MySQL environment.

What you will learn

  • Explore new and exciting features of MySQL 8.0
  • Analyze and optimize large MySQL queries
  • Understand MySQL Server 8.0 settings
  • Master the deployment of Group Replication and use it in an InnoDB cluster
  • Monitor large distributed databases
  • Discover different types of backups and recovery methods for your databases
  • Explore tips to help your critical data reach its full potential

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jan 31, 2019
Length: 286 pages
Edition : 1st
Language : English
ISBN-13 : 9781788833790
Vendor :
Oracle
Category :
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning

Product Details

Publication date : Jan 31, 2019
Length: 286 pages
Edition : 1st
Language : English
ISBN-13 : 9781788833790
Vendor :
Oracle
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 107.97
MySQL 8 Administrator???s Guide
€32.99
MySQL 8 Cookbook
€41.99
Advanced MySQL 8
€32.99
Total 107.97 Stars icon

Table of Contents

12 Chapters
Introduction Chevron down icon Chevron up icon
MySQL 8's New Features Chevron down icon Chevron up icon
Indexing Your Data for High Performance Chevron down icon Chevron up icon
Advanced Data Techniques for Large Queries Chevron down icon Chevron up icon
MySQL Data Dictionary in MySQL 8.0 Chevron down icon Chevron up icon
MySQL Server Settings Chevron down icon Chevron up icon
Group Replication in MySQL 8.0 Chevron down icon Chevron up icon
InnoDB Cluster in MySQL 8.0 Chevron down icon Chevron up icon
Monitoring Your Large Distributed Databases Chevron down icon Chevron up icon
Authentication and Security Management with MySQL 8.0 Chevron down icon Chevron up icon
Advanced MySQL Performance Tips and Techniques Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Half star icon Empty star icon Empty star icon 2.8
(5 Ratings)
5 star 40%
4 star 0%
3 star 0%
2 star 20%
1 star 40%
DjjZ Sep 18, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
One reviewer said this book was not very advanced and had a whole section on indexing, and who needs that? Well, I do. That is what convinced me to buy it. I have years of experience with a large application my company developed, and it still uses FoxPro, where I have tons of experience with indexing. But we are migrating to MySQL, and the chapter on indexing is exactly what I need. It will help me make the leap. I need to see how indexing in MySQL is different from FoxPro.
Amazon Verified review Amazon
Amazon Customer Jun 27, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Excellent book. Book explaining the advanced concepts in a very easy way, best thing in this book is you can cover the whole book within 1 week and every page will give you a fresh knowledge.There are exercises in each chapter to make sure you are learning the topics. This review can be helpful for others to take this book.Highly recommended.
Amazon Verified review Amazon
Knowledge Sponge Jul 21, 2019
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
I was looking for a book that would get me up to speed on the new capabilities of MySQL 8. This isn't it. It barely describes the new features, and doesn't even mention some major ones such as windowing. It is primarily about how to organise a database - indexes, replication, performance and so on. And it isn't very "advanced" - it has a section about why you should create indexes. If someone doesn't know that, they don't need an "advanced" book. I guess it's "advanced" as in "not for the person who only started using MySQL yesterday". It's probably an OK book at that level (though I didn't like the style, which I found patronising), just not what it claims to be from the title.
Amazon Verified review Amazon
Fran G. Mar 18, 2021
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
Focus is placed on differences from last version.
Amazon Verified review Amazon
martin yuk Dec 30, 2020
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
information of mysql is very basic
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.