I Wrote a Book on How You Broke Your Database – Here’s Why You Should Read It

Hacking MySQL - Breaking, Optimizing, and Securing MySQL for Your Use Case
Comments 0

Share to social media

Preface

If you are a frequent reader of Simple-Talk, it’s possible that you’ve come across blogs about optimizing all kinds of queries, tutorials on how to back up your database, tutorials on index internals, or even speaking at conferences. If you’re a DBA, these things should resonate with you because all of those things have their place. These blogs advance your knowledge about database internals and query structure or inform you about things to come. They have their place in your career as a developer because they educate you about things in the tech space, specifically the database world.

One more thing that educated people about all kinds of things of interest for ages were books. Books were a thing before some of us weren’t even born, and it’s an undeniable fact that they’re here to stay. Those who have been in the industry for a while will know that books are a great resource to learn things because:

  1. They provide us with long-form content meaning that you can dive into one specific topic and learn a thing or two or in-depth concepts about the subject that interests you as a reader.
  2. They provide authors with portability to arguments in that if you can show me someone who has written a lengthy book about any topic, I can show you a person who is knowledgeable about the subject that the book is written on.
  3. They teach people – if the person is knowledgeable about a specific subject and they write books about it, they usually do so because they want to teach others. Spreading knowledge through the written word is not an easy feat, and indeed, not a feat that everyone possesses. But if one possesses the talent to write (and, better yet, influence people as they write), they are able to give someone the ability to learn. If they help one person, that’s an achievement to them both, and if they help a lot of people, that’s an achievement to them both, the publisher, and, most likely, some people around the author, too.

There are multiple other reasons, but most of you reading probably know most of them – the bottom line being the fact that books are a type of long-form learning resource, and if those long-form learning resources are good enough, they present enormous upsides for you as a reader, the author as a writer, and the publisher as well.

For better or for worse, not all books are the same – some books are average, some are excellent, and some are bad and not worth reading at all.

Books About Databases

With that being said, if you’re in the database world, you’d probably agree with me in saying that books about databases often teach us about database performance. There are other books and some of those focus on incredibly specific things (Relational Database Index Design and the Optimizers by Tapio Lahdenmaki and Mike Leach is a good example), and that’s not to say that they’re bad (most of them aren’t), but regardless, saying that most database-focused books focus on how to improve performance is no exaggeration. There are indeed many such books – but what most of them lack is an explanation of how you broke your database to the point that you need the optimizations described in the book in the first place. Think about it: if you optimize something, you start from the bottom, and then work your way to the top, right?

In the database world, however, that’s rarely the case; most books, as I’ve already mentioned, focus on how to improve performance/security/availability or walk you through the basics of SQL or database design but lack the driving mechanism that got you to that point.

Hacking MySQL

Here’s where Hacking MySQL comes in – Hacking MySQL is my first book about the database world and its internal functionality focusing on how, when, and why developers break their databases to necessitate optimization (1), how to optimize their databases (2), and how to secure them from data breaches (3).

The book does have a subtitle – it’s called “Breaking, Optimizing, and Securing MySQL for Your Use Case” and it’s there for a reason; the book is split into three distinct parts telling you exactly how you broke your database to the point where you need optimizations for it, how to optimize your MySQL database instances for performance and availability, and lastly, how to secure everything you’ve just built too (security is paramount too, eh?)

Objectives of Hacking MySQL

My book walks you through multiple things to achieve the aforementioned three distinct objectives:

  1. It lets you understand the history of the DBMS as well as its storage engines.
  2. It lets you understand what, why, and how breaks your database management system to the point where you need optimizations described in the documentation/books/elsewhere in the first place.
  3. It lets you understand how your database understands and acts upon different kinds of SQL queries.
  4. It walks you through the internals of your server letting you understand the internals behind database errors and other trivia.
  5. It walks you through your schema, data types, and collations as well as optimization techniques for big data and indexing.
  6. It helps you understand how to act upon database backups and recovery and how to squeeze the most out of your particular MySQL database when working with them.
  7. It helps you understand not only how, but when and why you should secure your database instances and walks you through ways to do it.

You’ve Helped Me Write Hacking MySQL

The book is also packed with a variety of other gems, too – these gems are in place because I’ve been learning from some extremely bright people in the database world online and beyond and I’d be lying if I’d say that people working at Redgate didn’t contribute to this book either. As you can tell, the foreword of the book was written by Louis Davidson, which is something I’m immensely grateful for, too. The contents of the book can be found here, and the website dedicated to the book over at HackingMySQL.com will let you read some snippets to help you decide whether the book is something you’d enjoy or be interested in. And if you’re not, that’s fine too – perhaps you know someone who is.

Books like these wouldn’t be written without all of you, including you reading this blog at this very second. Books like these are comprised of knowledge acquired from people who share it free of charge. This knowledge then gets into the head of the author, is applied in practice, and that practice is then shared in the form of a book or two. For me, practice cultivated in a book that walks you through why your databases are faltering in the first place – and if you’re interested in hearing the answer, you should probably read it. Or at least let your colleagues know that the answer they’re looking for might be just around the corner. 🙂

Summary

I wrote a book on why, how, and when developers break their MySQL instances and I had a pretty awesome time doing so. Given that people at Redgate have contributed significantly to this book seeing the light of day in the first place, you just read a blog about it on Redgate, too. Hopefully, if you decide to read the book, you will have a good time educating yourself on why your databases might be faltering: you can find the book on Amazon or other stores such as Barnes & Noble – alternatively, you may consider emailing me (find my contacts on my website), and I may be able to hook you up with a PDF in return for a review. I hope that you’ve enjoyed reading this blog too and until next time.

Article tags

Load comments

About the author

Lukas Vileikis

See Profile

Lukas Vileikis is an ethical hacker and a frequent conference speaker. Since 2014, Lukas has found and responsibly disclosed security flaws in some of the most visited websites in Lithuania. He runs one of the biggest & fastest data breach search engines in the world - BreachDirectory.com, frequently speaks at conferences and blogs in multiple places including his blog over at lukasvileikis.com.