Synopses & Reviews
Stuck with bugs, performance problems, crashes, data corruption, and puzzling output? If youre a database programmer or DBA, theyre part of your life. The trick is knowing how to quickly recover from them. This unique, example-packed book shows you how to handle an array of vexing problems when working with MySQL.
Written by a principal technical support engineer at Oracle, MySQL Troubleshooting provides the background, tools, and expert steps for solving problems from simple to complex—whether data you thought you inserted doesnt turn up in a query, or the entire database is corrupt because of a server failure. With this book in hand, youll work with more confidence.
- Understand the source of a problem, even when the solution is simple
- Handle problems that occur when applications run in multiple threads
- Debug and fix problems caused by configuration options
- Discover how operating system tuning can affect your server
- Use troubleshooting techniques specific to replication issues
- Get a reference to additional troubleshooting techniques and tools, including third-party solutions
- Learn best practices for safe and effective troubleshooting—and for preventing problems
Sometimes applications can go mad: tables contain wrong data, users get random replies, server stop working, and so on. Several easy methods allow users to often find the problems quickly. This book, based on successful conference presentations by the author, cover SQL problems, memory and other server problems, replication, and problems related to particular storage engines.
About the Author
Sveta Smirnova is a Principal Technical Support Engineer in the BugsAnalysis Support Group at MySQL at Oracle. She works on trickysupport issues and MySQL software bugs on a daily basis. Before starting at MySQL in 2006, she worked as web developer on severalclosed CRM systems. She is an active participant in the open sourcecommunity. Her main interests in recent years is solving DBA problems and finding ways to semi-automate this process.
Table of Contents
Foreword; Preface; Audience; How to Solve a Problem; How This Book Is Organized; Some Choices Made in This Book; Conventions Used in This Book; Using Code Examples; Safari® Books Online; How to Contact Us; Acknowledgments; Chapter 1: Basics; 1.1 Incorrect Syntax; 1.2 Wrong Results from a SELECT; 1.3 When the Problem May Have Been a Previous Update; 1.4 Getting Information About a Query; 1.5 Tracing Back Errors in Data; 1.6 Slow Queries; 1.7 When the Server Does Not Answer; 1.8 Issues with Solutions Specific to Storage Engines; 1.9 Permission Issues; Chapter 2: You Are Not Alone: Concurrency Issues; 2.1 Locks and Transactions; 2.2 Locks; 2.3 Transactions; 2.4 Metadata Locking; 2.5 How Concurrency Affects Performance; 2.6 Other Locking Issues; 2.7 Replication and Concurrency; 2.8 Effectively Using MySQL Troubleshooting Tools; Chapter 3: Effects of Server Options; 3.1 Service Options; 3.2 Variables That Are Supposed to Change the Server Behavior; 3.3 Options That Limit Hardware Resources; 3.4 Using the --no-defaults Option; 3.5 Performance Options; 3.6 Haste Makes Waste; 3.7 The SET Statement; 3.8 How to Check Whether Changes Had an Effect; 3.9 Descriptions of Variables; Chapter 4: MySQL's Environment; 4.1 Physical Hardware Limits; 4.2 Operating System Limits; 4.3 Effects of Other Software; Chapter 5: Troubleshooting Replication; 5.1 Displaying Slave Status; 5.2 Problems with the I/O Thread; 5.3 Problems with the SQL Thread; Chapter 6: Troubleshooting Techniques and Tools; 6.1 The Query; 6.2 Effects of the Environment; 6.3 Sandboxes; 6.4 Errors and Logs; 6.5 Information-Gathering Tools; 6.6 Localizing the Problem (Minimizing the Test Case); 6.7 General Steps to Take in Troubleshooting; 6.8 Testing Methods; 6.9 Special Testing Tools; 6.10 Maintenance Tools; Chapter 7: Best Practices; 7.1 Backups; 7.2 Gathering the Information You Need; 7.3 Testing; 7.4 Prevention; 7.5 Think About It!; Information Resources; Resources Containing Information That Is Usually Useful; Bug and Knowledge Databases; Expert Knowledge Online; Places Where You Can Ask for Help; Books; Colophon;