
MySQL High Availability
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions

Content
- Intro
- Copyright
- Table of Contents
- Foreword for the Second Edition
- Foreword for the First Edition
- Preface
- Who This Book Is For
- How This Book Is Organized
- Part I, High Availability and Scalability
- Part II, Monitoring and Managing
- Appendixes
- Conventions Used in This Book
- Using Code Examples
- Safari® Books Online
- How to Contact Us
- Acknowledgments
- Part I. High Availability and Scalability
- Chapter 1. Introduction
- What's This Replication Stuff, Anyway?
- So, Backups Are Not Needed Then?
- What's With All the Monitoring?
- Is There Anything Else I Can Read?
- Conclusion
- Chapter 2. MySQL Replicant Library
- Basic Classes and Functions
- Supporting Different Operating Systems
- Servers
- Server Roles
- Conclusion
- Chapter 3. MySQL Replication Fundamentals
- Basic Steps in Replication
- Configuring the Master
- Configuring the Slave
- Connecting the Master and Slave
- A Brief Introduction to the Binary Log
- What's Recorded in the Binary Log
- Watching Replication in Action
- The Binary Log's Structure and Content
- Adding Slaves
- Cloning the Master
- Cloning a Slave
- Scripting the Clone Operation
- Performing Common Tasks with Replication
- Reporting
- Conclusion
- Chapter 4. The Binary Log
- Structure of the Binary Log
- Binlog Event Structure
- Event Checksums
- Logging Statements
- Logging Data Manipulation Language Statements
- Logging Data Definition Language Statements
- Logging Queries
- LOAD DATA INFILE Statements
- Binary Log Filters
- Triggers, Events, and Stored Routines
- Stored Procedures
- Stored Functions
- Events
- Special Constructions
- Nontransactional Changes and Error Handling
- Logging Transactions
- Transaction Cache
- Distributed Transaction Processing Using XA
- Binary Log Group Commit
- Row-Based Replication
- Enabling Row-based Replication
- Using Mixed Mode
- Binary Log Management
- The Binary Log and Crash Safety
- Binlog File Rotation
- Incidents
- Purging the Binlog File
- The mysqlbinlog Utility
- Basic Usage
- Interpreting Events
- Binary Log Options and Variables
- Options for Row-Based Replication
- Conclusion
- Chapter 5. Replication for High Availability
- Redundancy
- Planning
- Slave Failures
- Master Failures
- Relay Failures
- Disaster Recovery
- Procedures
- Hot Standby
- Dual Masters
- Slave Promotion
- Circular Replication
- Conclusion
- Chapter 6. MySQL Replication for Scale-Out
- Scaling Out Reads, Not Writes
- The Value of Asynchronous Replication
- Managing the Replication Topology
- Application-Level Load Balancing
- Hierarchical Replication
- Setting Up a Relay Server
- Adding a Relay in Python
- Specialized Slaves
- Filtering Replication Events
- Using Filtering to Partition Events to Slaves
- Managing Consistency of Data
- Consistency in a Nonhierarchical Deployment
- Consistency in a Hierarchical Deployment
- Conclusion
- Chapter 7. Data Sharding
- What Is Sharding?
- Why Should You Shard?
- Limitations of Sharding
- Elements of a Sharding Solution
- High-Level Sharding Architecture
- Partitioning the Data
- Shard Allocation
- Mapping the Sharding Key
- Sharding Scheme
- Shard Mapping Functions
- Processing Queries and Dispatching Transactions
- Handling Transactions
- Dispatching Queries
- Shard Management
- Moving a Shard to a Different Node
- Splitting Shards
- Conclusion
- Chapter 8. Replication Deep Dive
- Replication Architecture Basics
- The Structure of the Relay Log
- The Replication Threads
- Starting and Stopping the Slave Threads
- Running Replication over the Internet
- Setting Up Secure Replication Using Built-in Support
- Setting Up Secure Replication Using Stunnel
- Finer-Grained Control Over Replication
- Information About Replication Status
- Options for Handling Broken Connections
- How the Slave Processes Events
- Housekeeping in the I/O Thread
- SQL Thread Processing
- Semisynchronous Replication
- Configuring Semisynchronous Replication
- Monitoring Semisynchronous Replication
- Global Transaction Identifiers
- Setting Up Replication Using GTIDs
- Failover Using GTIDs
- Slave Promotion Using GTIDs
- Replication of GTIDs
- Slave Safety and Recovery
- Syncing, Transactions, and Problems with Database Crashes
- Transactional Replication
- Rules for Protecting Nontransactional Statements
- Multisource Replication
- Details of Row-Based Replication
- Table_map Events
- The Structure of Row Events
- Execution of Row Event
- Events and Triggers
- Filtering in Row-Based Replication
- Partial Row Replication
- Conclusion
- Chapter 9. MySQL Cluster
- What Is MySQL Cluster?
- Terminology and Components
- How Does MySQL Cluster Differ from MySQL?
- Typical Configuration
- Features of MySQL Cluster
- Local and Global Redundancy
- Log Handling
- Redundancy and Distributed Data
- Architecture of MySQL Cluster
- How Data Is Stored
- Partitioning
- Transaction Management
- Online Operations
- Example Configuration
- Getting Started
- Starting a MySQL Cluster
- Testing the Cluster
- Shutting Down the Cluster
- Achieving High Availability
- System Recovery
- Node Recovery
- Replication
- Achieving High Performance
- Considerations for High Performance
- High Performance Best Practices
- Conclusion
- Part II. Monitoring and Managing
- Chapter 10. Getting Started with Monitoring
- Ways of Monitoring
- Benefits of Monitoring
- System Components to Monitor
- Processor
- Memory
- Disk
- Network Subsystem
- Monitoring Solutions
- Linux and Unix Monitoring
- Process Activity
- Memory Usage
- Disk Usage
- Network Activity
- General System Statistics
- Automated Monitoring with cron
- Mac OS X Monitoring
- System Profiler
- Console
- Activity Monitor
- Microsoft Windows Monitoring
- The Windows Experience
- The System Health Report
- The Event Viewer
- The Reliability Monitor
- The Task Manager
- The Performance Monitor
- Monitoring as Preventive Maintenance
- Conclusion
- Chapter 11. Monitoring MySQL
- What Is Performance?
- MySQL Server Monitoring
- How MySQL Communicates Performance
- Performance Monitoring
- SQL Commands
- The mysqladmin Utility
- MySQL Workbench
- Third-Party Tools
- The MySQL Benchmark Suite
- Server Logs
- Performance Schema
- Concepts
- Getting Started
- Using Performance Schema to Diagnose Performance Problems
- MySQL Monitoring Taxonomy
- Database Performance
- Measuring Database Performance
- Best Practices for Database Optimization
- Best Practices for Improving Performance
- Everything Is Slow
- Slow Queries
- Slow Applications
- Slow Replication
- Conclusion
- Chapter 12. Storage Engine Monitoring
- InnoDB
- Using the SHOW ENGINE Command
- Using InnoDB Monitors
- Monitoring Logfiles
- Monitoring the Buffer Pool
- Monitoring Tablespaces
- Using INFORMATION_SCHEMA Tables
- Using PERFORMANCE_SCHEMA Tables
- Other Parameters to Consider
- Troubleshooting Tips for InnoDB
- MyISAM
- Optimizing Disk Storage
- Repairing Your Tables
- Using the MyISAM Utilities
- Storing a Table in Index Order
- Compressing Tables
- Defragmenting Tables
- Monitoring the Key Cache
- Preloading Key Caches
- Using Multiple Key Caches
- Other Parameters to Consider
- Conclusion
- Chapter 13. Replication Monitoring
- Getting Started
- Server Setup
- Inclusive and Exclusive Replication
- Replication Threads
- Monitoring the Master
- Monitoring Commands for the Master
- Master Status Variables
- Monitoring Slaves
- Monitoring Commands for the Slave
- Slave Status Variables
- Replication Monitoring with MySQL Workbench
- Other Items to Consider
- Networking
- Monitor and Manage Slave Lag
- Causes and Cures for Slave Lag
- Working with GTIDs
- Conclusion
- Chapter 14. Replication Troubleshooting
- What Can Go Wrong
- Problems on the Master
- Master Crashed and Memory Tables Are in Use
- Master Crashed and Binary Log Events Are Missing
- Query Runs Fine on the Master but Not on the Slave
- Table Corruption After a Crash
- Binary Log Is Corrupt on the Master
- Killing Long-Running Queries for Nontransactional Tables
- Unsafe Statements
- Problems on the Slave
- Slave Server Crashed and Replication Won't Start
- Slave Connection Times Out and Reconnects Frequently
- Query Results Are Different on the Slave than on the Master
- Slave Issues Errors when Attempting to Restart with SSL
- Memory Table Data Goes Missing
- Temporary Tables Are Missing After a Slave Crash
- Slave Is Slow and Is Not Synced with the Master
- Data Loss After a Slave Crash
- Table Corruption After a Crash
- Relay Log Is Corrupt on the Slave
- Multiple Errors During Slave Restart
- Consequences of a Failed Transaction on the Slave
- I/O Thread Problems
- SQL Thread Problems: Inconsistencies
- Different Errors on the Slave
- Advanced Replication Problems
- A Change Is Not Replicated Among the Topology
- Circular Replication Issues
- Multimaster Issues
- The HA_ERR_KEY_NOT_FOUND Error
- GTID Problems
- Tools for Troubleshooting Replication
- Best Practices
- Know Your Topology
- Check the Status of All of Your Servers
- Check Your Logs
- Check Your Configuration
- Conduct Orderly Shutdowns
- Conduct Orderly Restarts After a Failure
- Manually Execute Failed Queries
- Don't Mix Transactional and Nontransactional Tables
- Common Procedures
- Reporting Replication Bugs
- Conclusion
- Chapter 15. Protecting Your Investment
- What Is Information Assurance?
- The Three Practices of Information Assurance
- Why Is Information Assurance Important?
- Information Integrity, Disaster Recovery, and the Role of Backups
- High Availability Versus Disaster Recovery
- Disaster Recovery
- The Importance of Data Recovery
- Backup and Restore
- Backup Tools and OS-Level Solutions
- MySQL Enterprise Backup
- MySQL Utilities Database Export and Import
- The mysqldump Utility
- Physical File Copy
- Logical Volume Manager Snapshots
- XtraBackup
- Comparison of Backup Methods
- Backup and MySQL Replication
- Backup and Recovery with Replication
- PITR
- Automating Backups
- Conclusion
- Chapter 16. MySQL Enterprise Monitor
- Getting Started with MySQL Enterprise Monitor
- Commercial Offerings
- Anatomy of MySQL Enterprise Monitor
- Installation Overview
- MySQL Enterprise Monitor Components
- Dashboard
- Monitoring Agent
- Advisors
- Query Analyzer
- MySQL Production Support
- Using MySQL Enterprise Monitor
- Monitoring
- Query Analyzer
- Further Information
- Conclusion
- Chapter 17. Managing MySQL Replication with MySQL Utilities
- Common MySQL Replication Tasks
- Checking Status
- Stopping Replication
- Adding Slaves
- MySQL Utilities
- Getting Started
- Using the Utilities Without Workbench
- Using the Utilities via Workbench
- General Utilities
- Comparing Databases for Consistency: mysqldbcompare
- Copying Databases: mysqldbcopy
- Exporting Databases: mysqldbexport
- Importing Databases: mysqldbimport
- Discovering Differences: mysqldiff
- Showing Disk Usage: mysqldiskusage
- Checking Tables Indexes: mysqlindexcheck
- Searching Metadata: mysqlmetagrep
- Searching for Processes: mysqlprocgrep
- Cloning Servers: mysqlserverclone
- Showing Server Information: mysqlserverinfo
- Cloning Users: mysqluserclone
- Utilities Client: mysqluc
- Replication Utilities
- Setting Up Replication: mysqlreplicate
- Checking Replication Setup: mysqlrplcheck
- Showing Topologies: mysqlrplshow
- High Availability Utilities
- Concepts
- mysqlrpladmin
- mysqlfailover
- Creating Your Own Utilities
- Architecture of MySQL Utilities
- Custom Utility Example
- Conclusion
- Appendix A. Replication Tips and Tricks
- Examining the Binary Log with Verbose
- Using Replication to Repopulate a Table
- Statement-Based Logging
- Row-Based Logging
- Using MySQL Proxy to Perform Multimaster Replication
- Using a Default Storage Engine
- MySQL Cluster Multisource Replication
- Multichannel Replication with Failover
- Using the Current Database to Filter
- More Columns on Slave Than Master
- Fewer Columns on Slave Than Master
- Replicate Selected Rows to Slave
- Replication Heartbeat (5.4.4 or Later)
- Ignoring Servers in Circular Replication (5.5 or Later)
- Time-Delayed Replication (5.6 or Later)
- Shell Commands for Common Tasks
- Multisource Replication in a Shell Script
- Stored Procedure to Change Master
- Implementing Multisource Replication in Pure SQL (5.6 or Later)
- Appendix B. A GTID Implementation
- Adding GTIDs to a Server
- Transaction Handling Using GTIDs
- Finding Positions of GTIDs
- Index
- About the Authors
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.