Solutions for Database Developers and Administrators
Sveta Smirnova, Alkin Tezuysal
MySQL#
JSON#
MySQL_Server#
For MySQL, the price of popularity comes with a flood of questions from users on how to solve specific data-related issues. That's where this cookbook comes in. When you need quick solutions or techniques, this handy resource provides scores of short, focused pieces of code, hundreds of worked-out examples, and clear, concise explanations for programmers who don't have the time (or expertise) to resolve MySQL problems from scratch.
In this updated fourth edition, authors Sveta Smirnova and Alkin Tezuysal provide more than 200 recipes that cover powerful features in both MySQL 5.7 and 8.0. Beginners as well as professional database and web developers will dive into topics such as MySQL Shell, MySQL replication, and working with JSON.
You'll learn how to:
Who This Book Is For
This book will be useful for anybody who uses MySQL, ranging from individuals who want to use a database for personal projects such as a blog or wiki, to professional database and web developers. The book is also intended for people who do not know how to use MySQL but would like to.
If you’re new to MySQL, you’ll find lots of ways to use it here. If you’re more experienced, you’re probably already familiar with many of the problems addressed here but may not have had to solve them before and should find the book a great time-saver. Take advantage of the recipes given in the book, and use them in your own programs rather than writing the code from scratch.
The material ranges from introductory to advanced, so if a recipe describes techniques that seem obvious to you, skip it. Conversely, if you don’t understand a recipe, set it aside and come back to it later, perhaps after reading some of the other recipes.
What’s in This Book
It’s very likely when you use this book that you’re trying to develop an application but are not sure how to implement certain pieces of it. In this case, you already know what type of problem you want to solve; check the table of contents or the index for a recipe that shows how to do what you want. Ideally, the recipe will be just what you had in mind. Alternatively, you may be able to adapt a recipe for a similar problem to suit the issue at hand. We explain the principles involved in developing each technique so that you can modify it to fit the particular requirements of your own applications.
Another way to approach this book is to just read through it with no specific problem in mind. This can give you a broader understanding of the things MySQL can do, so we recommend that you page through the book occasionally. It’s a more effective tool if you know the kinds of problems it addresses.
As you get into later chapters, you’ll find recipes that assume a knowledge of topics covered in earlier chapters. This also applies within a chapter, where later sections often use techniques discussed earlier in the chapter. If you jump into a chapter and find a recipe that uses a technique with which you’re not familiar, check the table of contents or the index to find where the technique is explained earlier. For example, if a recipe sorts a query result using an ORDER BY clause that you don’t understand, turn to Chapter 9, which discusses various sorting methods and explains how they work.
Sveta Smirnova is a MySQL Support Engineer at Percona. Her main professional interests are problem-solving, working with tricky issues and bugs, and teaching others how to deal with MySQL issues, bugs and gotchas effectively. In addition to authoring "MySQL Troubleshooting" and "JSON UDF Functions for MySQL", Sveta has spoken at many events, including Fosdem, Percona Live, and Oracle Open World.
Alkin Tezuysal has extensive experience in open source relational databases, working in various sectors for large corporations. With over 25 years of industry experience, he has acquired skills for managing large projects from the ground up to production. For the past decade, he's been focused on e-commerce, SaaS, and MySQL technologies. Alkin has managed and architected database topologies for high-volume sites. He has several years of experience in 24X7 support and operational tasks and improving database systems for major companies. He has led global operations teams on Tier 1/2/3 support for MySQL customers. He currently holds the position of EVP - Global Services at fast-growing startup ChistaDATA Inc.