Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

MySQL Admin Cookbook LITE: Configuration, Server Monitoring, Managing Users
MySQL Admin Cookbook LITE: Configuration, Server Monitoring, Managing Users
MySQL Admin Cookbook LITE: Configuration, Server Monitoring, Managing Users
Ebook264 pages2 hours

MySQL Admin Cookbook LITE: Configuration, Server Monitoring, Managing Users

Rating: 4 out of 5 stars

4/5

()

Read preview

About this ebook

This cookbook presents solutions to problems in the form of recipes. Each recipe provides the reader with easy step-by-step descriptions of the actions necessary to accomplish a specific task. Example values and code samples are used throughout the recipes, which makes adaptation for individual needs easy. This book is for ambitious MySQL users as well as professional data center database administrators. Beginners as well as experienced administrators will benefit from this cookbook and get fresh ideas to improve their MySQL environments. Detailed background information will enable them to widen their MySQL horizon. It does not cover SQL basics, how to install MySQL servers, or how to design a relational database schema. Readers are expected to have a basic understanding of the SQL language and database concepts in general.
LanguageEnglish
Release dateMay 19, 2011
ISBN9781849516150
MySQL Admin Cookbook LITE: Configuration, Server Monitoring, Managing Users

Related to MySQL Admin Cookbook LITE

Related ebooks

Information Technology For You

View More

Related articles

Reviews for MySQL Admin Cookbook LITE

Rating: 4 out of 5 stars
4/5

1 rating0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    MySQL Admin Cookbook LITE - Daniel Schneller

    Table of Contents

    MySQL Admin Cookbook: LITE

    Credits

    About the Authors

    About the Reviewers

    Preface

    What this book covers

    What you need for this book

    Who this book is for

    Conventions

    Reader feedback

    Customer support

    Errata

    Piracy

    Questions

    1. Replication

    Introduction

    Statement Based Replication

    Filtering

    Setting up automatically updated slaves of a server based on a SQL dump

    Getting ready

    How to do it...

    How it works...

    See also

    Setting up automatically updated slaves of a selection of tables based on a SQL dump

    Getting ready

    How to do it...

    How it works...

    There's more...

    Setting up automatically updated slaves using data file copy

    Getting ready

    How to do it...

    How it works...

    There's more...

    Conserving data file by using LVM snapshots

    Backing up data using Percona xtrabackup

    Sharing read load across multiple machines

    Getting ready

    How to do it...

    How it works…

    There's more...

    Working with connection pools

    Working on other programming environments

    Considering efficiency while adding slaves

    Using replication to provide full-text indexing for InnoDB tables

    Getting ready

    How to do it...

    How it works...

    There's more...

    Setting up new slaves in this scenario

    See also

    Estimating network and slave I/O load

    Getting ready

    How to do it...

    How it works...

    There's more...

    Handling intermittent connectivity between master and slave

    Enabling compression with the slave_compressed_protocol option

    Limiting network and slave I/O load in heavy write scenarios using the blackhole storage engine

    Getting ready

    How to do it...

    How it works...

    Other storage engines than InnoDB

    Setting up slaves via network streaming

    Getting ready

    How to do it...

    How it works...

    Temporary daemon

    Dumping master data

    Shutting down and compressing

    Transferring to the slave and uncompressing

    Adjusting slave configuration

    Connecting to the master

    Starting the slave

    Skipping problematic queries

    Getting ready

    How to do it...

    How it works...

    There's more...

    Checking if servers are in sync

    Getting ready

    How to do it...

    How it works...

    There's more...

    Avoiding duplicate server IDs

    Getting ready

    How to do it…

    How it works...

    There's more...

    Recognizing symptoms of duplicate server IDs

    Setting up slaves to report custom information about themselves to the master

    Getting ready

    How to do it...

    How it works...

    There's more...

    2. Indexing

    Introduction

    Infinite storage, infinite expectations

    Speed by redundancy

    Storage engine differences

    MyISAM

    InnoDB

    Primary (clustered) indexes

    Secondary indexes

    General requirements for the recipes in this chapter

    Adding indexes to tables

    Getting ready

    How to do it...

    How it works...

    There's more...

    Using MySQL Query Browser to generate the SQL statements

    Prefix indexes

    Prefix primary keys

    See also

    Adding a fulltext index

    Getting ready

    How to do it...

    How it works...

    There's more...

    Case sensitivity

    Word length

    Stopwords

    Ignoring frequent words

    Query modes

    Sphinx

    See also

    Creating a normalized text search column

    Getting ready

    How to do it...

    How it works...

    There is more...

    Removing indexes from tables

    Getting ready

    How to do it...

    How it works...

    There's more...

    See also

    Estimating InnoDB index space requirements

    Getting ready...

    How to do it...

    How it works

    There's more...

    Considering actual data lengths in your estimate

    Minding character sets

    Using prefix primary keys

    Getting ready...

    How to do it...

    How it works...

    Choosing InnoDB primary key columns

    Getting ready

    How to do it...

    How it works...

    Uniqueness

    Immutability

    Key length

    Single column keys

    Clustered Index

    Speeding up searches for (sub)domains

    Getting ready

    How to do it...

    How it works...

    There's more...

    See also

    Finding duplicate indexes

    Getting ready

    How to do it...

    How it works

    There's more...

    Index

    MySQL Admin Cookbook: LITE


    MySQL Admin Cookbook: LITE

    Copyright © 2011 Packt Publishing

    All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

    Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

    Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

    First published: April 2011

    Production Reference: 1130411

    Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK.

    ISBN 978-1-849516-14-3

    www.packtpub.com

    Cover Image by Vinayak Chittar ( <vinayak.chittar@gmail.com> )

    Credits

    Authors

    Daniel Schneller

    Udo Schwedt

    Reviewers

    Kai Seidler

    Marc Delisle

    Acquisition Editor

    Sarah Cullington

    Technical Editor

    Manasi Poonthottam

    Indexer

    Rekha Nair

    Graphics

    Geetanjali Sawant

    Production Coordinator

    Adline Swetha Jesuthas

    Cover Work

    Kruthika Bangera

    About the Authors

    Daniel Schneller works as a software developer, database administrator, and general IT professional for an independent software vendor in the retail sector. After successfully graduating from the University of Cooperative Education in Heidenheim, Germany with a degree in Business Computer Science, he started his career as a professional software developer, focused on the Microsoft technology stack. In 2002, he started focusing on enterprise-level Java development and has since gained extensive knowledge and experience implementing large scale systems based on Java EE and relational databases, especially MySQL since version 4.0.

    Currently, he is mostly involved with the ongoing development of framework-level functionality, including customization and extension of an ORM-based persistence layer. He is involved in different open source projects such as FindBugs, Eclipse, and Checkstyle, and infrequently blogs about Java, MySQL, Windows, Linux, and other insanities at http://www.danielschneller.com.

    When I first was asked by Packt Publishing whether I would be interested in writing a book about MySQL on Christmas Eve 2008 little did I know how much work, stress, but also what a lot of fun I was headed for.

    Now, that the book is finally done I would like to thank those people without whom getting it done would have been impossible.

    First of all, I'd like to thank Udo for agreeing to be my co-author. Without him, this whole thing would have taken a lot longer and would have been not half as useful as I believe it has turned out now.

    I would also like to thank the team at Packt Publishing—most importantly for noticing and reading my blog, consequently contacting me to get the whole thing started—but also for taking care of schedules, providing support, guidance and feedback, and keeping us on track the whole way.

    Last, but by no means least, I want to thank Jenny—for encouraging me to write a book in the first place, and then making sure I never ran out of tea, cookies, or motivation on the countless evenings I spent sitting in front of the keyboard instead of with her. I dedicate this book to her.

    Udo Schwedt has over ten years of experience in the IT industry as a professional Java developer and software architect. He is head of the Java architecture team and deputy head of the Java development department at the IT service provider for Germany's market leader in the Do-It-Yourself sector.

    He has been fascinated by computers since his childhood, and taught himself the basics of programming during his school years. After graduating from school, he began his studies at the RWTH Aachen, Germany, which he finished with a summa cum laude degree in computer science, minoring in psychology with a focus on software ergonomics.

    Udo started his career as a professional C, C++, and Java developer in a software company that delivers leading solutions in the financial online transaction processing sector. In 2003, he joined his current employer as a Java framework developer for a large-scale international project, where he met Daniel. In the course of the project, he gained extensive experience in using MySQL in a professional context.

    For both Daniel and Udo, the common project involved the design and implementation of a database infrastructure solution for a Java-based merchandise management software system with tens of thousands of clients. The evaluation of different database systems and the realization of the infrastructure made it necessary for them to delve into MySQL beyond the typical utilization scenarios. The resulting decentralized multi-platform environment based on more than 500 decentralized MySQL server instances with more than 5,500 replication slaves bears challenges not covered by the standard MySQL documentation.

    To the Packt Publishing team: Thank you for critiques, encouragement, and organization.

    To Daniel: Thank you so much for your confidence in me. I still feel honored you asked me to co-author this book—you should know better

    Enjoying the preview?
    Page 1 of 1