How This Book Is Organized

This book has seven chapters and an appendix.

Chapter 1, Basics, describes basic troubleshooting techniques that you’ll use in nearly any situation. This chapter covers only single-threaded problems, i.e., problems that are repeatable with a single connection in isolation. I start with this isolated and somewhat unrealistic setting because you will need these techniques to isolate a problem in a multithreaded application.

Chapter 2, You Are Not Alone: Concurrency Issues, describes problems that come up when applications run in multiple threads or interfere with transactions in other applications.

Chapter 3, Effects of Server Options, consists of two parts. The first is a guide to debugging and fixing a problem caused by a configuration option. The second is a reference to important options and is meant to be consulted as needed instead of being read straight through. The second part also contains recommendations on how to solve problems caused by particular options and information about how to test whether you have solved the problem. I tried to include techniques not described in other references, and to consolidate in one place all the common problems with configuration options. I also grouped them by the kind of problems, so you can easily search for the cause of your symptom.

Chapter 4, MySQL’s Environment, is about hardware and other aspects of the environment in which the server runs. This is a huge topic, but most of the necessary information is specific to operating systems and often can be solved only by the system administrator. So I list some points a MySQL database administrator (DBA) must look into. After you read this short chapter, you will know when to blame your environment and how to explain the problem to your system administrator.

Chapter 5, Troubleshooting Replication, is about problems that come up specifically in replication scenarios. I actually discuss replication issues throughout this book, but other chapters discuss the relationship between replication and other problems. This chapter is for issues that are specific to replication.

Chapter 6, Troubleshooting Techniques and Tools, describes extra techniques and tools that I skipped over or failed to discuss in detail during earlier guidelines to troubleshooting. The purpose of this chapter is to close all the gaps left in earlier chapters. You can use it as a reference if you like. I show principles first, then mention available tools. I can’t write about tools I don’t work with, so I explain the ones I personally use every day, which consequently leads to a focus on tools written by the MySQL Team and now belonging to Oracle. I do include third-party tools that help me deal with bugs and support tickets every day.

Chapter 7, Best Practices, describes good habits and behaviors for safe and effective troubleshooting. It does not describe all the best practices for designing MySQL applications, which are covered in many other sources, but instead concentrates on practices that help with problem hunting—or help prevent problems.

The Appendix A, contains a list of information sources that I use in my daily job and that can help in troubleshooting situations. Of course, some of them influenced this book, and I refer to them where appropriate.

Get MySQL Troubleshooting now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.