MySQL Admin Cookbook LITE: Configuration, Server Monitoring, Managing Users
By Daniel Schneller and Udo Schwedt
4/5
()
About this ebook
Related to MySQL Admin Cookbook LITE
Related ebooks
MySQL Admin Cookbook LITE: Replication and Indexing Rating: 4 out of 5 stars4/5High Availability MySQL Cookbook Rating: 0 out of 5 stars0 ratingsMariaDB High Performance Rating: 0 out of 5 stars0 ratingsMariaDB Essentials Rating: 0 out of 5 stars0 ratingsjQuery UI 1.7: The User Interface Library for jQuery Rating: 0 out of 5 stars0 ratingsSymfony2 Essentials Rating: 0 out of 5 stars0 ratingsLearning Azure DocumentDB Rating: 0 out of 5 stars0 ratingsPHPEclipse: A User Guide Rating: 3 out of 5 stars3/5Microsoft .NET Framework 4.5 Quickstart Cookbook Rating: 0 out of 5 stars0 ratingsPostgreSQL Development Essentials Rating: 5 out of 5 stars5/5Learning PHP Data Objects Rating: 5 out of 5 stars5/5Lucene 4 Cookbook Rating: 0 out of 5 stars0 ratingsLearn SQL with MySQL: Retrieve and Manipulate Data Using SQL Commands with Ease Rating: 0 out of 5 stars0 ratingsGetting Started with MariaDB - Second Edition Rating: 0 out of 5 stars0 ratingsMySQL 5.1 Plugin Development Rating: 0 out of 5 stars0 ratingsPostgreSQL Administration Cookbook, 9.5/9.6 Edition Rating: 0 out of 5 stars0 ratingsPostgreSQL 9 Administration Cookbook - Second Edition Rating: 0 out of 5 stars0 ratingsInstant Pentaho Data Integration Kitchen Rating: 0 out of 5 stars0 ratingsThe Real MCTS SQL Server 2008 Exam 70-432 Prep Kit: Database Implementation and Maintenance Rating: 4 out of 5 stars4/5Nosql A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsMySQL Cluster 7.5 inside and out Rating: 0 out of 5 stars0 ratingsPostgreSQL 9 Administration Cookbook LITE: Configuration, Monitoring and Maintenance Rating: 3 out of 5 stars3/5Mastering MariaDB Rating: 0 out of 5 stars0 ratingsIBM InfoSphere Replication Server and Data Event Publisher Rating: 0 out of 5 stars0 ratingsMariaDB Complete Self-Assessment Guide Rating: 0 out of 5 stars0 ratingsModern CSS: Master the Key Concepts of CSS for Modern Web Development Rating: 0 out of 5 stars0 ratingsjQuery Mobile Web Development Essentials - Third Edition Rating: 0 out of 5 stars0 ratingsIntroduction to DBMS: Designing and Implementing Databases from Scratch for Absolute Beginners Rating: 0 out of 5 stars0 ratingsAWS Organizations Second Edition Rating: 0 out of 5 stars0 ratingsASP.NET AJAX The Ultimate Step-By-Step Guide Rating: 0 out of 5 stars0 ratings
Information Technology For You
Computer Science: A Concise Introduction Rating: 4 out of 5 stars4/5How to Write Effective Emails at Work Rating: 4 out of 5 stars4/5Creating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5Health Informatics: Practical Guide Rating: 0 out of 5 stars0 ratingsHow To Use Chatgpt: Using Chatgpt To Make Money Online Has Never Been This Simple Rating: 0 out of 5 stars0 ratingsInkscape Beginner’s Guide Rating: 5 out of 5 stars5/5CompTIA A+ CertMike: Prepare. Practice. Pass the Test! Get Certified!: Core 1 Exam 220-1101 Rating: 0 out of 5 stars0 ratingsChatGPT: The Future of Intelligent Conversation Rating: 4 out of 5 stars4/5Data Analytics for Beginners: Introduction to Data Analytics Rating: 4 out of 5 stars4/5AWS Certified Cloud Practitioner: Study Guide with Practice Questions and Labs Rating: 5 out of 5 stars5/5Micro Niches Rating: 0 out of 5 stars0 ratingsCompTIA ITF+ CertMike: Prepare. Practice. Pass the Test! Get Certified!: Exam FC0-U61 Rating: 0 out of 5 stars0 ratingsLinux Command Line and Shell Scripting Bible Rating: 3 out of 5 stars3/5Hacking Essentials - The Beginner's Guide To Ethical Hacking And Penetration Testing Rating: 3 out of 5 stars3/5CODING INTERVIEW: Advanced Methods to Learn and Excel in Coding Interview Rating: 0 out of 5 stars0 ratingsRaspberry Pi :Raspberry Pi Guide On Python & Projects Programming In Easy Steps Rating: 3 out of 5 stars3/5An Ultimate Guide to Kali Linux for Beginners Rating: 3 out of 5 stars3/5COMPUTER SCIENCE FOR ROOKIES Rating: 0 out of 5 stars0 ratingsCybersecurity for Beginners : Learn the Fundamentals of Cybersecurity in an Easy, Step-by-Step Guide: 1 Rating: 0 out of 5 stars0 ratingsThe Best Damn Cybercrime and Digital Forensics Book Period Rating: 3 out of 5 stars3/5Computer Organization and Design: The Hardware / Software Interface Rating: 4 out of 5 stars4/5Programming for Everyone Rating: 3 out of 5 stars3/5Handbook of Digital Forensics and Investigation Rating: 4 out of 5 stars4/5Windows Registry Forensics: Advanced Digital Forensic Analysis of the Windows Registry Rating: 4 out of 5 stars4/5Supercommunicator: Explaining the Complicated So Anyone Can Understand Rating: 3 out of 5 stars3/5The Basics of Hacking and Penetration Testing: Ethical Hacking and Penetration Testing Made Easy Rating: 4 out of 5 stars4/5Guide to Healthcare Information Protection and Privacy for Executives Rating: 0 out of 5 stars0 ratings
Reviews for MySQL Admin Cookbook LITE
1 rating0 reviews
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