MySQL Troubleshooting: What To Do When Queries Don't Work

MySQL Troubleshooting: What To Do When Queries Don't Work

by Sveta Smirnova


View All Available Formats & Editions
Choose Expedited Shipping at checkout for delivery by Monday, May 17


Stuck with bugs, performance problems, crashes, data corruption, and puzzling output? If you’re a database programmer or DBA, they’re 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 doesn’t turn up in a query, or the entire database is corrupt because of a server failure. With this book in hand, you’ll 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

Product Details

ISBN-13: 9781449312008
Publisher: O'Reilly Media, Incorporated
Publication date: 02/22/2012
Pages: 266
Product dimensions: 6.90(w) x 9.10(h) x 0.70(d)

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

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;
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;

Customer Reviews