MySQL 5.5 Reference Manual

Including MySQL Cluster NDB 7.2 Reference Guide

Abstract

This is the MySQL™ Reference Manual. It documents MySQL 5.5 through 5.5.27, as well as MySQL Cluster releases based on version 7.2 of NDBCLUSTER through 5.5.25-ndb-7.2.7.

MySQL 5.5 features.  This manual describes features that are not included in every edition of MySQL 5.5; such features may not be included in the edition of MySQL 5.5 licensed to you. If you have any questions about the features included in your edition of MySQL 5.5, refer to your MySQL 5.5 license agreement or contact your Oracle sales representative.

Document generated on: 2012-06-23 (revision: 30913)

For legal information, see the Legal Notice.


Table of Contents

Preface and Legal Notice
1. General Information
1.1. About This Manual
1.2. Typographical and Syntax Conventions
1.3. Overview of the MySQL Database Management System
1.3.1. What is MySQL?
1.3.2. The Main Features of MySQL
1.3.3. History of MySQL
1.4. What Is New in MySQL 5.5
1.4.1. Scalability Improvements
1.4.2. InnoDB I/O Subsystem Changes
1.4.3. Diagnostic and Monitoring Capabilities
1.4.4. Enhanced Solaris Support
1.5. MySQL Development History
1.6. MySQL Information Sources
1.6.1. MySQL Mailing Lists
1.6.2. MySQL Community Support at the MySQL Forums
1.6.3. MySQL Community Support on Internet Relay Chat (IRC)
1.6.4. MySQL Enterprise
1.7. How to Report Bugs or Problems
1.8. MySQL Standards Compliance
1.8.1. What Standards MySQL Follows
1.8.2. Selecting SQL Modes
1.8.3. Running MySQL in ANSI Mode
1.8.4. MySQL Extensions to Standard SQL
1.8.5. MySQL Differences from Standard SQL
1.8.6. How MySQL Deals with Constraints
1.9. Credits
1.9.1. Contributors to MySQL
1.9.2. Documenters and translators
1.9.3. Packages that support MySQL
1.9.4. Tools that were used to create MySQL
1.9.5. Supporters of MySQL
2. Installing and Upgrading MySQL
2.1. General Installation Guidance
2.1.1. Operating Systems Supported by MySQL Community Server
2.1.2. Choosing Which MySQL Distribution to Install
2.1.3. How to Get MySQL
2.1.4. Verifying Package Integrity Using MD5 Checksums or GnuPG
2.1.5. Installation Layouts
2.1.6. Compiler-Specific Build Characteristics
2.2. Installing MySQL from Generic Binaries on Unix/Linux
2.3. Installing MySQL on Microsoft Windows
2.3.1. MySQL Installation Layout on Microsoft Windows
2.3.2. Choosing An Installation Package
2.3.3. Installing MySQL on Microsoft Windows Using MySQL Installer
2.3.4. Installing MySQL on Microsoft Windows Using an MSI Package
2.3.5. MySQL Server Instance Configuration Wizard
2.3.6. Installing MySQL on Microsoft Windows Using a noinstall Zip Archive
2.3.7. Troubleshooting a Microsoft Windows MySQL Server Installation
2.3.8. Upgrading MySQL on Windows
2.3.9. Windows Postinstallation Procedures
2.4. Installing MySQL on Mac OS X
2.4.1. General Notes on Installing MySQL on Mac OS X
2.4.2. Installing MySQL on Mac OS X Using Native Packages
2.4.3. Installing the MySQL Startup Item
2.4.4. Installing and Using the MySQL Preference Pane
2.4.5. Using the Bundled MySQL on Mac OS X Server
2.5. Installing MySQL on Linux
2.5.1. Installing MySQL from RPM Packages on Linux
2.5.2. Installing MySQL on Linux using Native Package Manager
2.6. Installing MySQL on Solaris and OpenSolaris
2.6.1. Installing MySQL on Solaris using a Solaris PKG
2.6.2. Installing MySQL on OpenSolaris using IPS
2.7. Installing MySQL on HP-UX
2.7.1. General Notes on Installing MySQL on HP-UX
2.7.2. Installing MySQL on HP-UX using DEPOT
2.8. Installing MySQL on FreeBSD
2.9. Installing MySQL from Source
2.9.1. MySQL Layout for Source Installation
2.9.2. Installing MySQL from a Standard Source Distribution
2.9.3. Installing MySQL from a Development Source Tree
2.9.4. MySQL Source-Configuration Options
2.9.5. Dealing with Problems Compiling MySQL
2.9.6. MySQL Configuration and Third-Party Tools
2.10. Postinstallation Setup and Testing
2.10.1. Unix Postinstallation Procedures
2.10.2. Securing the Initial MySQL Accounts
2.11. Upgrading or Downgrading MySQL
2.11.1. Upgrading MySQL
2.11.2. Downgrading MySQL
2.11.3. Checking Whether Tables or Indexes Must Be Rebuilt
2.11.4. Rebuilding or Repairing Tables or Indexes
2.11.5. Copying MySQL Databases to Another Machine
2.12. Environment Variables
2.13. Perl Installation Notes
2.13.1. Installing Perl on Unix
2.13.2. Installing ActiveState Perl on Windows
2.13.3. Problems Using the Perl DBI/DBD Interface
3. Tutorial
3.1. Connecting to and Disconnecting from the Server
3.2. Entering Queries
3.3. Creating and Using a Database
3.3.1. Creating and Selecting a Database
3.3.2. Creating a Table
3.3.3. Loading Data into a Table
3.3.4. Retrieving Information from a Table
3.4. Getting Information About Databases and Tables
3.5. Using mysql in Batch Mode
3.6. Examples of Common Queries
3.6.1. The Maximum Value for a Column
3.6.2. The Row Holding the Maximum of a Certain Column
3.6.3. Maximum of Column per Group
3.6.4. The Rows Holding the Group-wise Maximum of a Certain Column
3.6.5. Using User-Defined Variables
3.6.6. Using Foreign Keys
3.6.7. Searching on Two Keys
3.6.8. Calculating Visits Per Day
3.6.9. Using AUTO_INCREMENT
3.7. Using MySQL with Apache
4. MySQL Programs
4.1. Overview of MySQL Programs
4.2. Using MySQL Programs
4.2.1. Invoking MySQL Programs
4.2.2. Connecting to the MySQL Server
4.2.3. Specifying Program Options
4.2.4. Setting Environment Variables
4.3. MySQL Server and Server-Startup Programs
4.3.1. mysqld — The MySQL Server
4.3.2. mysqld_safe — MySQL Server Startup Script
4.3.3. mysql.server — MySQL Server Startup Script
4.3.4. mysqld_multi — Manage Multiple MySQL Servers
4.4. MySQL Installation-Related Programs
4.4.1. comp_err — Compile MySQL Error Message File
4.4.2. mysqlbug — Generate Bug Report
4.4.3. mysql_install_db — Initialize MySQL Data Directory
4.4.4. mysql_plugin — Configure MySQL Server Plugins
4.4.5. mysql_secure_installation — Improve MySQL Installation Security
4.4.6. mysql_tzinfo_to_sql — Load the Time Zone Tables
4.4.7. mysql_upgrade — Check Tables for MySQL Upgrade
4.5. MySQL Client Programs
4.5.1. mysql — The MySQL Command-Line Tool
4.5.2. mysqladmin — Client for Administering a MySQL Server
4.5.3. mysqlcheck — A Table Maintenance Program
4.5.4. mysqldump — A Database Backup Program
4.5.5. mysqlimport — A Data Import Program
4.5.6. mysqlshow — Display Database, Table, and Column Information
4.5.7. mysqlslap — Load Emulation Client
4.6. MySQL Administrative and Utility Programs
4.6.1. innochecksum — Offline InnoDB File Checksum Utility
4.6.2. myisam_ftdump — Display Full-Text Index information
4.6.3. myisamchk — MyISAM Table-Maintenance Utility
4.6.4. myisamlog — Display MyISAM Log File Contents
4.6.5. myisampack — Generate Compressed, Read-Only MyISAM Tables
4.6.6. mysqlaccess — Client for Checking Access Privileges
4.6.7. mysqlbinlog — Utility for Processing Binary Log Files
4.6.8. mysqldumpslow — Summarize Slow Query Log Files
4.6.9. mysqlhotcopy — A Database Backup Program
4.6.10. mysql_convert_table_format — Convert Tables to Use a Given Storage Engine
4.6.11. mysql_find_rows — Extract SQL Statements from Files
4.6.12. mysql_fix_extensions — Normalize Table File Name Extensions
4.6.13. mysql_setpermission — Interactively Set Permissions in Grant Tables
4.6.14. mysql_waitpid — Kill Process and Wait for Its Termination
4.6.15. mysql_zap — Kill Processes That Match a Pattern
4.7. MySQL Program Development Utilities
4.7.1. msql2mysql — Convert mSQL Programs for Use with MySQL
4.7.2. mysql_config — Get Compile Options for Compiling Clients
4.7.3. my_print_defaults — Display Options from Option Files
4.7.4. resolve_stack_dump — Resolve Numeric Stack Trace Dump to Symbols
4.8. Miscellaneous Programs
4.8.1. perror — Explain Error Codes
4.8.2. replace — A String-Replacement Utility
4.8.3. resolveip — Resolve Host name to IP Address or Vice Versa
5. MySQL Server Administration
5.1. The MySQL Server
5.1.1. Server Option and Variable Reference
5.1.2. Server Command Options
5.1.3. Server System Variables
5.1.4. Using System Variables
5.1.5. Server Status Variables
5.1.6. Server SQL Modes
5.1.7. Server Plugins
5.1.8. IPv6 Support
5.1.9. Server-Side Help
5.1.10. Server Response to Signals
5.1.11. The Shutdown Process
5.2. MySQL Server Logs
5.2.1. Selecting General Query and Slow Query Log Output Destinations
5.2.2. The Error Log
5.2.3. The General Query Log
5.2.4. The Binary Log
5.2.5. The Slow Query Log
5.2.6. Server Log Maintenance
5.3. Running Multiple MySQL Instances on One Machine
5.3.1. Setting Up Multiple Data Directories
5.3.2. Running Multiple MySQL Instances on Windows
5.3.3. Running Multiple MySQL Instances on Unix
5.3.4. Using Client Programs in a Multiple-Server Environment
5.4. Tracing mysqld Using DTrace
5.4.1. mysqld DTrace Probe Reference
6. Security
6.1. General Security Issues
6.1.1. Security Guidelines
6.1.2. Password Security in MySQL
6.1.3. Making MySQL Secure Against Attackers
6.1.4. Security-Related mysqld Options
6.1.5. How to Run MySQL as a Normal User
6.1.6. Security Issues with LOAD DATA LOCAL
6.1.7. Client Programming Security Guidelines
6.2. The MySQL Access Privilege System
6.2.1. Privileges Provided by MySQL
6.2.2. Privilege System Grant Tables
6.2.3. Specifying Account Names
6.2.4. Access Control, Stage 1: Connection Verification
6.2.5. Access Control, Stage 2: Request Verification
6.2.6. When Privilege Changes Take Effect
6.2.7. Causes of Access-Denied Errors
6.3. MySQL User Account Management
6.3.1. User Names and Passwords
6.3.2. Adding User Accounts
6.3.3. Removing User Accounts
6.3.4. Setting Account Resource Limits
6.3.5. Assigning Account Passwords
6.3.6. Pluggable Authentication
6.3.7. Proxy Users
6.3.8. Using SSL for Secure Connections
6.3.9. Connecting to MySQL Remotely from Windows with SSH
6.3.10. Auditing MySQL Account Activity
7. Backup and Recovery
7.1. Backup and Recovery Types
7.2. Database Backup Methods
7.3. Example Backup and Recovery Strategy
7.3.1. Establishing a Backup Policy
7.3.2. Using Backups for Recovery
7.3.3. Backup Strategy Summary
7.4. Using mysqldump for Backups
7.4.1. Dumping Data in SQL Format with mysqldump
7.4.2. Reloading SQL-Format Backups
7.4.3. Dumping Data in Delimited-Text Format with mysqldump
7.4.4. Reloading Delimited-Text Format Backups
7.4.5. mysqldump Tips
7.5. Point-in-Time (Incremental) Recovery Using the Binary Log
7.5.1. Point-in-Time Recovery Using Event Times
7.5.2. Point-in-Time Recovery Using Event Positions
7.6. MyISAM Table Maintenance and Crash Recovery
7.6.1. Using myisamchk for Crash Recovery
7.6.2. How to Check MyISAM Tables for Errors
7.6.3. How to Repair MyISAM Tables
7.6.4. MyISAM Table Optimization
7.6.5. Setting Up a MyISAM Table Maintenance Schedule
8. Optimization
8.1. Optimization Overview
8.2. Optimizing SQL Statements
8.2.1. Optimizing SELECT Statements
8.2.2. Optimizing DML Statements
8.2.3. Optimizing Database Privileges
8.2.4. Optimizing INFORMATION_SCHEMA Queries
8.2.5. Other Optimization Tips
8.3. Optimization and Indexes
8.3.1. How MySQL Uses Indexes
8.3.2. Using Primary Keys
8.3.3. Using Foreign Keys
8.3.4. Column Indexes
8.3.5. Multiple-Column Indexes
8.3.6. Verifying Index Usage
8.3.7. InnoDB and MyISAM Index Statistics Collection
8.3.8. Comparison of B-Tree and Hash Indexes
8.4. Optimizing Database Structure
8.4.1. Optimizing Data Size
8.4.2. Optimizing MySQL Data Types
8.4.3. Optimizing for Many Tables
8.5. Optimizing for InnoDB Tables
8.5.1. Optimizing Storage Layout for InnoDB Tables
8.5.2. Optimizing InnoDB Transaction Management
8.5.3. Optimizing InnoDB Logging
8.5.4. Bulk Data Loading for InnoDB Tables
8.5.5. Optimizing InnoDB Queries
8.5.6. Optimizing InnoDB DDL Operations
8.5.7. Optimizing InnoDB Disk I/O
8.5.8. Optimizing InnoDB Configuration Variables
8.5.9. Optimizing InnoDB for Systems with Many Tables
8.6. Optimizing for MyISAM Tables
8.6.1. Optimizing MyISAM Queries
8.6.2. Bulk Data Loading for MyISAM Tables
8.6.3. Speed of REPAIR TABLE Statements
8.7. Optimizing for MEMORY Tables
8.8. Understanding the Query Execution Plan
8.8.1. Optimizing Queries with EXPLAIN
8.8.2. EXPLAIN Output Format
8.8.3. EXPLAIN EXTENDED Output Format
8.8.4. Estimating Query Performance
8.8.5. Controlling the Query Optimizer
8.9. Buffering and Caching
8.9.1. The InnoDB Buffer Pool
8.9.2. The MyISAM Key Cache
8.9.3. The MySQL Query Cache
8.10. Optimizing Locking Operations
8.10.1. Internal Locking Methods
8.10.2. Table Locking Issues
8.10.3. Concurrent Inserts
8.10.4. Metadata Locking Within Transactions
8.10.5. External Locking
8.11. Optimizing the MySQL Server
8.11.1. System Factors and Startup Parameter Tuning
8.11.2. Tuning Server Parameters
8.11.3. Optimizing Disk I/O
8.11.4. Optimizing Memory Use
8.11.5. Optimizing Network Use
8.11.6. The Thread Pool Plugin
8.12. Measuring Performance (Benchmarking)
8.12.1. Measuring the Speed of Expressions and Functions
8.12.2. The MySQL Benchmark Suite
8.12.3. Using Your Own Benchmarks
8.12.4. Measuring Performance with performance_schema
8.12.5. Examining Thread Information
8.13. Internal Details of MySQL Optimizations
8.13.1. Range Optimization
8.13.2. Index Merge Optimization
8.13.3. Engine Condition Pushdown Optimization
8.13.4. IS NULL Optimization
8.13.5. LEFT JOIN and RIGHT JOIN Optimization
8.13.6. Nested-Loop Join Algorithms
8.13.7. Nested Join Optimization
8.13.8. Outer Join Simplification
8.13.9. ORDER BY Optimization
8.13.10. GROUP BY Optimization
8.13.11. DISTINCT Optimization
8.13.12. Optimizing Subqueries with EXISTS Strategy
9. Language Structure
9.1. Literal Values
9.1.1. String Literals
9.1.2. Number Literals
9.1.3. Date and Time Literals
9.1.4. Hexadecimal Literals
9.1.5. Boolean Literals
9.1.6. Bit-Field Literals
9.1.7. NULL Values
9.2. Schema Object Names
9.2.1. Identifier Qualifiers
9.2.2. Identifier Case Sensitivity
9.2.3. Mapping of Identifiers to File Names
9.2.4. Function Name Parsing and Resolution
9.3. Reserved Words
9.4. User-Defined Variables
9.5. Expression Syntax
9.6. Comment Syntax
10. Globalization
10.1. Character Set Support
10.1.1. Character Sets and Collations in General
10.1.2. Character Sets and Collations in MySQL
10.1.3. Specifying Character Sets and Collations
10.1.4. Connection Character Sets and Collations
10.1.5. Configuring the Character Set and Collation for Applications
10.1.6. Character Set for Error Messages
10.1.7. Collation Issues
10.1.8. String Repertoire
10.1.9. Operations Affected by Character Set Support
10.1.10. Unicode Support
10.1.11. Upgrading from Previous to Current Unicode Support
10.1.12. UTF-8 for Metadata
10.1.13. Column Character Set Conversion
10.1.14. Character Sets and Collations That MySQL Supports
10.2. Setting the Error Message Language
10.3. Adding a Character Set
10.3.1. Character Definition Arrays
10.3.2. String Collating Support for Complex Character Sets
10.3.3. Multi-Byte Character Support for Complex Character Sets
10.4. Adding a Collation to a Character Set
10.4.1. Collation Implementation Types
10.4.2. Choosing a Collation ID
10.4.3. Adding a Simple Collation to an 8-Bit Character Set
10.4.4. Adding a UCA Collation to a Unicode Character Set
10.5. Character Set Configuration
10.6. MySQL Server Time Zone Support
10.6.1. Staying Current with Time Zone Changes
10.6.2. Time Zone Leap Second Support
10.7. MySQL Server Locale Support
11. Data Types
11.1. Data Type Overview
11.1.1. Numeric Type Overview
11.1.2. Date and Time Type Overview
11.1.3. String Type Overview
11.1.4. Data Type Default Values
11.2. Numeric Types
11.2.1. Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT
11.2.2. Fixed-Point Types (Exact Value) - DECIMAL, NUMERIC
11.2.3. Floating-Point Types (Approximate Value) - FLOAT, DOUBLE
11.2.4. Bit-Value Type - BIT
11.2.5. Numeric Type Attributes
11.2.6. Out-of-Range and Overflow Handling
11.3. Date and Time Types
11.3.1. The DATE, DATETIME, and TIMESTAMP Types
11.3.2. The TIME Type
11.3.3. The YEAR Type
11.3.4. Automatic Initialization and Updating for TIMESTAMP
11.3.5. Fractional Seconds in Time Values
11.3.6. Conversion Between Date and Time Types
11.3.7. Two-Digit Years in Dates
11.4. String Types
11.4.1. The CHAR and VARCHAR Types
11.4.2. The BINARY and VARBINARY Types
11.4.3. The BLOB and TEXT Types
11.4.4. The ENUM Type
11.4.5. The SET Type
11.5. Data Type Storage Requirements
11.6. Choosing the Right Type for a Column
11.7. Using Data Types from Other Database Engines
12. Functions and Operators
12.1. Function and Operator Reference
12.2. Type Conversion in Expression Evaluation
12.3. Operators
12.3.1. Operator Precedence
12.3.2. Comparison Functions and Operators
12.3.3. Logical Operators
12.3.4. Assignment Operators
12.4. Control Flow Functions
12.5. String Functions
12.5.1. String Comparison Functions
12.5.2. Regular Expressions
12.6. Numeric Functions and Operators
12.6.1. Arithmetic Operators
12.6.2. Mathematical Functions
12.7. Date and Time Functions
12.8. What Calendar Is Used By MySQL?
12.9. Full-Text Search Functions
12.9.1. Natural Language Full-Text Searches
12.9.2. Boolean Full-Text Searches
12.9.3. Full-Text Searches with Query Expansion
12.9.4. Full-Text Stopwords
12.9.5. Full-Text Restrictions
12.9.6. Fine-Tuning MySQL Full-Text Search
12.9.7. Adding a Collation for Full-Text Indexing
12.10. Cast Functions and Operators
12.11. XML Functions
12.12. Bit Functions
12.13. Encryption and Compression Functions
12.14. Information Functions
12.15. Miscellaneous Functions
12.16. Functions and Modifiers for Use with GROUP BY Clauses
12.16.1. GROUP BY (Aggregate) Functions
12.16.2. GROUP BY Modifiers
12.16.3. GROUP BY and HAVING with Hidden Columns
12.17. Spatial Extensions
12.17.1. Introduction to MySQL Spatial Support
12.17.2. The OpenGIS Geometry Model
12.17.3. Supported Spatial Data Formats
12.17.4. Creating a Spatially Enabled MySQL Database
12.17.5. Spatial Analysis Functions
12.17.6. Optimizing Spatial Analysis
12.17.7. MySQL Conformance and Compatibility
12.18. Precision Math
12.18.1. Types of Numeric Values
12.18.2. DECIMAL Data Type Changes
12.18.3. Expression Handling
12.18.4. Rounding Behavior
12.18.5. Precision Math Examples
13. SQL Statement Syntax
13.1. Data Definition Statements
13.1.1. ALTER DATABASE Syntax
13.1.2. ALTER EVENT Syntax
13.1.3. ALTER LOGFILE GROUP Syntax
13.1.4. ALTER FUNCTION Syntax
13.1.5. ALTER PROCEDURE Syntax
13.1.6. ALTER SERVER Syntax
13.1.7. ALTER TABLE Syntax
13.1.8. ALTER TABLESPACE Syntax
13.1.9. ALTER VIEW Syntax
13.1.10. CREATE DATABASE Syntax
13.1.11. CREATE EVENT Syntax
13.1.12. CREATE FUNCTION Syntax
13.1.13. CREATE INDEX Syntax
13.1.14. CREATE LOGFILE GROUP Syntax
13.1.15. CREATE PROCEDURE and CREATE FUNCTION Syntax
13.1.16. CREATE SERVER Syntax
13.1.17. CREATE TABLE Syntax
13.1.18. CREATE TABLESPACE Syntax
13.1.19. CREATE TRIGGER Syntax
13.1.20. CREATE VIEW Syntax
13.1.21. DROP DATABASE Syntax
13.1.22. DROP EVENT Syntax
13.1.23. DROP FUNCTION Syntax
13.1.24. DROP INDEX Syntax
13.1.25. DROP LOGFILE GROUP Syntax
13.1.26. DROP PROCEDURE and DROP FUNCTION Syntax
13.1.27. DROP SERVER Syntax
13.1.28. DROP TABLE Syntax
13.1.29. DROP TABLESPACE Syntax
13.1.30. DROP TRIGGER Syntax
13.1.31. DROP VIEW Syntax
13.1.32. RENAME TABLE Syntax
13.1.33. TRUNCATE TABLE Syntax
13.2. Data Manipulation Statements
13.2.1. CALL Syntax
13.2.2. DELETE Syntax
13.2.3. DO Syntax
13.2.4. HANDLER Syntax
13.2.5. INSERT Syntax
13.2.6. LOAD DATA INFILE Syntax
13.2.7. LOAD XML Syntax
13.2.8. REPLACE Syntax
13.2.9. SELECT Syntax
13.2.10. Subquery Syntax
13.2.11. UPDATE Syntax
13.3. MySQL Transactional and Locking Statements
13.3.1. START TRANSACTION, COMMIT, and ROLLBACK Syntax
13.3.2. Statements That Cannot Be Rolled Back
13.3.3. Statements That Cause an Implicit Commit
13.3.4. SAVEPOINT and ROLLBACK TO SAVEPOINT Syntax
13.3.5. LOCK TABLES and UNLOCK TABLES Syntax
13.3.6. SET TRANSACTION Syntax
13.3.7. XA Transactions
13.4. Replication Statements
13.4.1. SQL Statements for Controlling Master Servers
13.4.2. SQL Statements for Controlling Slave Servers
13.5. SQL Syntax for Prepared Statements
13.5.1. PREPARE Syntax
13.5.2. EXECUTE Syntax
13.5.3. DEALLOCATE PREPARE Syntax
13.5.4. Automatic Prepared Statement Repreparation
13.6. MySQL Compound-Statement Syntax
13.6.1. BEGIN ... END Compound-Statement Syntax
13.6.2. Statement Label Syntax
13.6.3. DECLARE Syntax
13.6.4. Variables in Stored Programs
13.6.5. Flow Control Statements
13.6.6. Cursors
13.6.7. Condition Handling
13.7. Database Administration Statements
13.7.1. Account Management Statements
13.7.2. Table Maintenance Statements
13.7.3. Plugin and User-Defined Function Statements
13.7.4. SET Syntax
13.7.5. SHOW Syntax
13.7.6. Other Administrative Statements
13.8. MySQL Utility Statements
13.8.1. DESCRIBE Syntax
13.8.2. EXPLAIN Syntax
13.8.3. HELP Syntax
13.8.4. USE Syntax
14. Storage Engines
14.1. Setting the Storage Engine
14.2. Overview of MySQL Storage Engine Architecture
14.2.1. Pluggable Storage Engine Architecture
14.2.2. The Common Database Server Layer
14.3. The InnoDB Storage Engine
14.3.1. InnoDB as the Default MySQL Storage Engine
14.3.2. Configuring InnoDB
14.3.3. Using Per-Table Tablespaces
14.3.4. InnoDB Startup Options and System Variables
14.3.5. Creating and Using InnoDB Tables
14.3.6. Adding, Removing, or Resizing InnoDB Data and Log Files
14.3.7. Backing Up and Recovering an InnoDB Database
14.3.8. Moving an InnoDB Database to Another Machine
14.3.9. The InnoDB Transaction Model and Locking
14.3.10. InnoDB Multi-Versioning
14.3.11. InnoDB Table and Index Structures
14.3.12. InnoDB Disk I/O and File Space Management
14.3.13. InnoDB Error Handling
14.3.14. InnoDB Performance Tuning and Troubleshooting
14.3.15. Limits on InnoDB Tables
14.4. New Features of InnoDB 1.1
14.4.1. Introduction to InnoDB 1.1
14.4.2. Fast Index Creation in the InnoDB Storage Engine
14.4.3. InnoDB Data Compression
14.4.4. InnoDB File-Format Management
14.4.5. How InnoDB Stores Variable-Length Columns
14.4.6. InnoDB INFORMATION_SCHEMA tables
14.4.7. InnoDB Performance and Scalability Enhancements
14.4.8. Changes for Flexibility, Ease of Use and Reliability
14.4.9. Installing the InnoDB Storage Engine
14.4.10. Upgrading the InnoDB Storage Engine
14.4.11. Downgrading the InnoDB Storage Engine
14.4.12. InnoDB Storage Engine Change History
14.4.13. Third-Party Software
14.4.14. List of Parameters Changed in InnoDB 1.1 and InnoDB Plugin 1.0
14.5. The MyISAM Storage Engine
14.5.1. MyISAM Startup Options
14.5.2. Space Needed for Keys
14.5.3. MyISAM Table Storage Formats
14.5.4. MyISAM Table Problems
14.6. The MEMORY Storage Engine
14.7. The CSV Storage Engine
14.7.1. Repairing and Checking CSV Tables
14.7.2. CSV Limitations
14.8. The ARCHIVE Storage Engine
14.9. The BLACKHOLE Storage Engine
14.10. The MERGE Storage Engine
14.10.1. MERGE Table Advantages and Disadvantages
14.10.2. MERGE Table Problems
14.11. The FEDERATED Storage Engine
14.11.1. FEDERATED Storage Engine Overview
14.11.2. How to Create FEDERATED Tables
14.11.3. FEDERATED Storage Engine Notes and Tips
14.11.4. FEDERATED Storage Engine Resources
14.12. The EXAMPLE Storage Engine
14.13. Other Storage Engines
15. High Availability and Scalability
15.1. Oracle VM Template for MySQL Enterprise Edition
15.2. Using MySQL with DRBD
15.2.1. Configuring the DRBD Environment
15.2.2. Configuring MySQL for DRBD
15.2.3. Optimizing Performance and Reliability
15.3. Using Linux HA Heartbeat
15.3.1. Heartbeat Configuration
15.3.2. Using Heartbeat with MySQL and DRBD
15.3.3. Using Heartbeat with DRBD and dopd
15.3.4. Dealing with System Level Errors in a Heartbeat Cluster
15.4. Using MySQL within an Amazon EC2 Instance
15.4.1. Setting Up MySQL on an EC2 AMI
15.4.2. EC2 Instance Limitations
15.4.3. Deploying a MySQL Database Using EC2
15.5. Using ZFS Replication
15.5.1. Using ZFS for File System Replication
15.5.2. Configuring MySQL for ZFS Replication
15.5.3. Handling MySQL Recovery with ZFS
15.6. Using MySQL with memcached
15.6.1. Installing memcached
15.6.2. Using memcached
15.6.3. Developing a memcached Application
15.6.4. Getting memcached Statistics
15.6.5. memcached FAQ
15.7. MySQL Proxy
15.7.1. MySQL Proxy Supported Platforms
15.7.2. Installing MySQL Proxy
15.7.3. MySQL Proxy Command Options
15.7.4. MySQL Proxy Scripting
15.7.5. Using MySQL Proxy
15.7.6. MySQL Proxy FAQ
16. Replication
16.1. Replication Configuration
16.1.1. How to Set Up Replication
16.1.2. Replication Formats
16.1.3. Replication and Binary Logging Options and Variables
16.1.4. Common Replication Administration Tasks
16.2. Replication Implementation
16.2.1. Replication Implementation Details
16.2.2. Replication Relay and Status Logs
16.2.3. How Servers Evaluate Replication Filtering Rules
16.3. Replication Solutions
16.3.1. Using Replication for Backups
16.3.2. Using Replication with Different Master and Slave Storage Engines
16.3.3. Using Replication for Scale-Out
16.3.4. Replicating Different Databases to Different Slaves
16.3.5. Improving Replication Performance
16.3.6. Switching Masters During Failover
16.3.7. Setting Up Replication Using SSL
16.3.8. Semisynchronous Replication
16.4. Replication Notes and Tips
16.4.1. Replication Features and Issues
16.4.2. Replication Compatibility Between MySQL Versions
16.4.3. Upgrading a Replication Setup
16.4.4. Troubleshooting Replication
16.4.5. How to Report Replication Bugs or Problems
17. MySQL Cluster NDB 7.2
17.1. MySQL Cluster Overview
17.1.1. MySQL Cluster Core Concepts
17.1.2. MySQL Cluster Nodes, Node Groups, Replicas, and Partitions
17.1.3. MySQL Cluster Hardware, Software, and Networking Requirements
17.1.4. MySQL Cluster Development History
17.1.5. MySQL Server using InnoDB Compared with MySQL Cluster
17.1.6. Known Limitations of MySQL Cluster
17.2. MySQL Cluster Installation
17.2.1. Installing MySQL Cluster on Linux
17.2.2. Installing MySQL Cluster on Windows
17.2.3. Initial Configuration of MySQL Cluster
17.2.4. Initial Startup of MySQL Cluster
17.2.5. MySQL Cluster Example with Tables and Data
17.2.6. Safe Shutdown and Restart of MySQL Cluster
17.2.7. Upgrading and Downgrading MySQL Cluster NDB 7.2
17.3. MySQL Cluster Configuration
17.3.1. Quick Test Setup of MySQL Cluster
17.3.2. MySQL Cluster Configuration Files
17.3.3. Overview of MySQL Cluster Configuration Parameters
17.3.4. MySQL Server Options and Variables for MySQL Cluster
17.3.5. Using High-Speed Interconnects with MySQL Cluster
17.4. MySQL Cluster Programs
17.4.1. ndbd — The MySQL Cluster Data Node Daemon
17.4.2. ndbinfo_select_all — The MySQL Cluster Management Client
17.4.3. ndbmtd — The MySQL Cluster Data Node Daemon (Multi-Threaded)
17.4.4. ndb_mgmd — The MySQL Cluster Management Server Daemon
17.4.5. ndb_mgm — The MySQL Cluster Management Client
17.4.6. ndb_config — Extract MySQL Cluster Configuration Information
17.4.7. ndb_cpcd — Automate Testing for NDB Development
17.4.8. ndb_delete_all — Delete All Rows from an NDB Table
17.4.9. ndb_desc — Describe NDB Tables
17.4.10. ndb_drop_index — Drop Index from an NDB Table
17.4.11. ndb_drop_table — Drop an NDB Table
17.4.12. ndb_error_reporter — NDB Error-Reporting Utility
17.4.13. ndb_index_stat — NDB Error-Reporting Utility
17.4.14. ndb_print_backup_file — Print NDB Backup File Contents
17.4.15. ndb_print_schema_file — Print NDB Schema File Contents
17.4.16. ndb_print_sys_file — Print NDB System File Contents
17.4.17. ndbd_redo_log_reader — Check and Print Content of Cluster Redo Log
17.4.18. ndb_restore — Restore a MySQL Cluster Backup
17.4.19. ndb_select_all — Print Rows from an NDB Table
17.4.20. ndb_select_count — Print Row Counts for NDB Tables
17.4.21. ndb_show_tables — Display List of NDB Tables
17.4.22. ndb_size.pl — NDBCLUSTER Size Requirement Estimator
17.4.23. ndb_waiter — Wait for MySQL Cluster to Reach a Given Status
17.4.24. Options Common to MySQL Cluster Programs — Options Common to MySQL Cluster Programs
17.5. Management of MySQL Cluster
17.5.1. Summary of MySQL Cluster Start Phases
17.5.2. Commands in the MySQL Cluster Management Client
17.5.3. Online Backup of MySQL Cluster
17.5.4. MySQL Server Usage for MySQL Cluster
17.5.5. Performing a Rolling Restart of a MySQL Cluster
17.5.6. Event Reports Generated in MySQL Cluster
17.5.7. MySQL Cluster Log Messages
17.5.8. MySQL Cluster Single User Mode
17.5.9. Quick Reference: MySQL Cluster SQL Statements
17.5.10. The ndbinfo MySQL Cluster Information Database
17.5.11. MySQL Cluster Security Issues
17.5.12. MySQL Cluster Disk Data Tables
17.5.13. Adding MySQL Cluster Data Nodes Online
17.5.14. Distributed MySQL Privileges for MySQL Cluster
17.5.15. NDB API Statistics Counters and Variables
17.5.16. ndbmemcache
17.6. MySQL Cluster Replication
17.6.1. MySQL Cluster Replication: Abbreviations and Symbols
17.6.2. General Requirements for MySQL Cluster Replication
17.6.3. Known Issues in MySQL Cluster Replication
17.6.4. MySQL Cluster Replication Schema and Tables
17.6.5. Preparing the MySQL Cluster for Replication
17.6.6. Starting MySQL Cluster Replication (Single Replication Channel)
17.6.7. Using Two Replication Channels for MySQL Cluster Replication
17.6.8. Implementing Failover with MySQL Cluster Replication
17.6.9. MySQL Cluster Backups With MySQL Cluster Replication
17.6.10. MySQL Cluster Replication: Multi-Master and Circular Replication
17.6.11. MySQL Cluster Replication Conflict Resolution
17.7. Changes in MySQL Cluster
17.7.1. Changes in MySQL Cluster NDB 7.2
18. Partitioning
18.1. Overview of Partitioning in MySQL
18.2. Partitioning Types
18.2.1. RANGE Partitioning
18.2.2. LIST Partitioning
18.2.3. COLUMNS Partitioning
18.2.4. HASH Partitioning
18.2.5. KEY Partitioning
18.2.6. Subpartitioning
18.2.7. How MySQL Partitioning Handles NULL
18.3. Partition Management
18.3.1. Management of RANGE and LIST Partitions
18.3.2. Management of HASH and KEY Partitions
18.3.3. Maintenance of Partitions
18.3.4. Obtaining Information About Partitions
18.4. Partition Pruning
18.5. Restrictions and Limitations on Partitioning
18.5.1. Partitioning Keys, Primary Keys, and Unique Keys
18.5.2. Partitioning Limitations Relating to Storage Engines
18.5.3. Partitioning Limitations Relating to Functions
19. Stored Programs and Views
19.1. Defining Stored Programs
19.2. Using Stored Routines (Procedures and Functions)
19.2.1. Stored Routine Syntax
19.2.2. Stored Routines and MySQL Privileges
19.2.3. Stored Routine Metadata
19.2.4. Stored Procedures, Functions, Triggers, and LAST_INSERT_ID()
19.3. Using Triggers
19.3.1. Trigger Syntax
19.3.2. Trigger Metadata
19.4. Using the Event Scheduler
19.4.1. Event Scheduler Overview
19.4.2. Event Scheduler Configuration
19.4.3. Event Syntax
19.4.4. Event Metadata
19.4.5. Event Scheduler Status
19.4.6. The Event Scheduler and MySQL Privileges
19.5. Using Views
19.5.1. View Syntax
19.5.2. View Processing Algorithms
19.5.3. Updatable and Insertable Views
19.5.4. View Metadata
19.6. Access Control for Stored Programs and Views
19.7. Binary Logging of Stored Programs
20. INFORMATION_SCHEMA Tables
20.1. The INFORMATION_SCHEMA CHARACTER_SETS Table
20.2. The INFORMATION_SCHEMA COLLATIONS Table
20.3. The INFORMATION_SCHEMA COLLATION_CHARACTER_SET_APPLICABILITY Table
20.4. The INFORMATION_SCHEMA COLUMNS Table
20.5. The INFORMATION_SCHEMA COLUMN_PRIVILEGES Table
20.6. The INFORMATION_SCHEMA ENGINES Table
20.7. The INFORMATION_SCHEMA EVENTS Table
20.8. The INFORMATION_SCHEMA FILES Table
20.9. The INFORMATION_SCHEMA GLOBAL_STATUS and SESSION_STATUS Tables
20.10. The INFORMATION_SCHEMA GLOBAL_VARIABLES and SESSION_VARIABLES Tables
20.11. The INFORMATION_SCHEMA KEY_COLUMN_USAGE Table
20.12. The INFORMATION_SCHEMA PARAMETERS Table
20.13. The INFORMATION_SCHEMA PARTITIONS Table
20.14. The INFORMATION_SCHEMA PLUGINS Table
20.15. The INFORMATION_SCHEMA PROCESSLIST Table
20.16. The INFORMATION_SCHEMA PROFILING Table
20.17. The INFORMATION_SCHEMA REFERENTIAL_CONSTRAINTS Table
20.18. The INFORMATION_SCHEMA ROUTINES Table
20.19. The INFORMATION_SCHEMA SCHEMATA Table
20.20. The INFORMATION_SCHEMA SCHEMA_PRIVILEGES Table
20.21. The INFORMATION_SCHEMA STATISTICS Table
20.22. The INFORMATION_SCHEMA TABLES Table
20.23. The INFORMATION_SCHEMA TABLESPACES Table
20.24. The INFORMATION_SCHEMA TABLE_CONSTRAINTS Table
20.25. The INFORMATION_SCHEMA TABLE_PRIVILEGES Table
20.26. The INFORMATION_SCHEMA TRIGGERS Table
20.27. The INFORMATION_SCHEMA USER_PRIVILEGES Table
20.28. The INFORMATION_SCHEMA VIEWS Table
20.29. INFORMATION_SCHEMA Tables for InnoDB
20.29.1. The INFORMATION_SCHEMA INNODB_CMP and INNODB_CMP_RESET Tables
20.29.2. The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables
20.29.3. The INFORMATION_SCHEMA INNODB_TRX Table
20.29.4. The INFORMATION_SCHEMA INNODB_LOCKS Table
20.29.5. The INFORMATION_SCHEMA INNODB_LOCK_WAITS Table
20.30. Thread Pool INFORMATION_SCHEMA Tables
20.30.1. The INFORMATION_SCHEMA TP_THREAD_STATE Table
20.30.2. The INFORMATION_SCHEMA TP_THREAD_GROUP_STATE Table
20.30.3. The INFORMATION_SCHEMA TP_THREAD_GROUP_STATS Table
20.31. Extensions to SHOW Statements
21. MySQL Performance Schema
21.1. Performance Schema Quick Start
21.2. Performance Schema Configuration
21.2.1. Performance Schema Build Configuration
21.2.2. Performance Schema Startup Configuration
21.2.3. Performance Schema Runtime Configuration
21.3. Performance Schema Queries
21.4. Performance Schema Instrument Naming Conventions
21.5. Performance Schema Status Monitoring
21.6. Performance Schema General Table Characteristics
21.7. Performance Schema Table Descriptions
21.7.1. Performance Schema Setup Tables
21.7.2. Performance Schema Instance Tables
21.7.3. Performance Schema Wait Event Tables
21.7.4. Performance Schema Summary Tables
21.7.5. Performance Schema Miscellaneous Tables
21.8. Performance Schema System Variables
21.9. Performance Schema Status Variables
21.10. Performance Schema and Plugins
21.11. Using the Performance Schema to Diagnose Problems
22. Connectors and APIs
22.1. MySQL Connector/ODBC
22.1.1. Connector/ODBC Versions
22.1.2. Connector/ODBC Introduction
22.1.3. Connector/ODBC Installation
22.1.4. Connector/ODBC Configuration
22.1.5. Connector/ODBC Examples
22.1.6. Connector/ODBC Reference
22.1.7. Connector/ODBC Notes and Tips
22.1.8. Connector/ODBC Support
22.2. MySQL Connector/Net
22.2.1. Connector/Net Versions
22.2.2. Installing Connector/Net
22.2.3. Connector/Net Visual Studio Integration
22.2.4. Connector/Net Tutorials
22.2.5. Connector/Net Programming
22.2.6. Connector/Net Connection String Options Reference
22.2.7. Connector/Net API Reference
22.2.8. Connector/Net Support
22.2.9. Connector/Net FAQ
22.3. MySQL Connector/J
22.3.1. Overview of MySQL Connector/J
22.3.2. Connector/J Versions
22.3.3. Connector/J Installation
22.3.4. Connector/J Examples
22.3.5. Connector/J (JDBC) Reference
22.3.6. JDBC Concepts
22.3.7. Connection Pooling with Connector/J
22.3.8. Load Balancing with Connector/J
22.3.9. Failover with Connector/J
22.3.10. Using the Connector/J Interceptor Classes
22.3.11. Using Connector/J with Tomcat
22.3.12. Using Connector/J with JBoss
22.3.13. Using Connector/J with Spring
22.3.14. Using Connector/J with GlassFish
22.3.15. Troubleshooting Connector/J Applications
22.3.16. Connector/J Support
22.4. MySQL Connector/C++
22.4.1. Installing the MySQL Connector/C++ Binary
22.4.2. Installing MySQL Connector/C++ from Source
22.4.3. MySQL Connector/C++ Building Windows Applications with Microsoft Visual Studio
22.4.4. MySQL Connector/C++ Building Linux Applications with NetBeans
22.4.5. MySQL Connector/C++ Getting Started: Usage Examples
22.4.6. MySQL Connector/C++ Tutorials
22.4.7. MySQL Connector/C++ Debug Tracing
22.4.8. MySQL Connector/C++ Usage Notes
22.4.9. MySQL Connector/C++ Known Bugs and Issues
22.4.10. MySQL Connector/C++ Feature requests
22.4.11. MySQL Connector/C++ Support
22.4.12. MySQL Connector/C++ FAQ
22.5. MySQL Connector/C
22.5.1. Building MySQL Connector/C from the Source Code
22.5.2. Testing MySQL Connector/C
22.5.3. MySQL Connector/C FAQ
22.6. MySQL Connector/OpenOffice.org
22.6.1. Installation
22.6.2. Getting Started: Connecting to MySQL
22.6.3. Getting Started: Usage Examples
22.6.4. References
22.6.5. Known Bugs
22.6.6. Contact
22.7. libmysqld, the Embedded MySQL Server Library
22.7.1. Compiling Programs with libmysqld
22.7.2. Restrictions When Using the Embedded MySQL Server
22.7.3. Options with the Embedded Server
22.7.4. Embedded Server Examples
22.7.5. Licensing the Embedded Server
22.8. MySQL C API
22.8.1. C API Data Structures
22.8.2. C API Function Overview
22.8.3. C API Function Descriptions
22.8.4. C API Prepared Statements
22.8.5. C API Prepared Statement Data Structures
22.8.6. C API Prepared Statement Function Overview
22.8.7. C API Prepared Statement Function Descriptions
22.8.8. C API Threaded Function Descriptions
22.8.9. C API Embedded Server Function Descriptions
22.8.10. C API Client Plugin Functions
22.8.11. Common Questions and Problems When Using the C API
22.8.12. Controlling Automatic Reconnection Behavior
22.8.13. C API Support for Multiple Statement Execution
22.8.14. C API Prepared Statement Problems
22.8.15. C API Prepared Statement Handling of Date and Time Values
22.8.16. C API Support for Prepared CALL Statements
22.8.17. Building Client Programs
22.9. MySQL PHP API
22.9.1. Overview of the MySQL PHP drivers
22.9.2. Original MySQL API (Mysql)
22.9.3. MySQL Improved Extension (Mysqli)
22.9.4. MySQL Functions (PDO_MYSQL) (MySQL (PDO))
22.9.5. MySQL Native Driver (Mysqlnd)
22.9.6. Mysqlnd replication and load balancing plugin (mysqlnd_ms)
22.9.7. Mysqlnd query result cache plugin (mysqlnd_qc)
22.9.8. Mysqlnd user handler plugin (mysqlnd_uh)
22.9.9. Connector/PHP
22.9.10. Common Problems with MySQL and PHP
22.9.11. Enabling Both mysql and mysqli in PHP
22.10. MySQL Perl API
22.11. MySQL Python API
22.12. MySQL Ruby APIs
22.12.1. The MySQL/Ruby API
22.12.2. The Ruby/MySQL API
22.13. MySQL Tcl API
22.14. MySQL Eiffel Wrapper
23. Extending MySQL
23.1. MySQL Internals
23.1.1. MySQL Threads
23.1.2. The MySQL Test Suite
23.2. The MySQL Plugin API
23.2.1. Plugin API Characteristics
23.2.2. Plugin API Components
23.2.3. Types of Plugins
23.2.4. Writing Plugins
23.2.5. MySQL Services for Plugins
23.3. Adding New Functions to MySQL
23.3.1. Features of the User-Defined Function Interface
23.3.2. Adding a New User-Defined Function
23.3.3. Adding a New Native Function
23.4. Debugging and Porting MySQL
23.4.1. Debugging a MySQL Server
23.4.2. Debugging a MySQL Client
23.4.3. The DBUG Package
24. MySQL Enterprise Monitor
25. MySQL Enterprise Backup
26. MySQL Workbench
A. Licenses for Third-Party Components
A.1. Ant-Contrib License
A.2. ANTLR 3.3 License
A.3. Boost Library License
A.4. dtoa.c License
A.5. Editline Library (libedit) License
A.6. FindGTest.cmake License
A.7. Fred Fish's Dbug Library License
A.8. getarg License
A.9. GLib License (for MySQL Proxy)
A.10. GNU General Public License Version 2.0, June 1991
A.11. GNU Lesser General Public License Version 2.1, February 1999
A.12. GNU Libtool License
A.13. GNU Readline License
A.14. Google Controlling Master Thread I/O Rate Patch License
A.15. Google Perftools (TCMalloc utility) License
A.16. Google SMP Patch License
A.17. lib_sql.cc License
A.18. Libaio License
A.19. libevent License
A.20. Libiconv License
A.21. libintl License
A.22. Linux-PAM License
A.23. LPeg Library License
A.24. Lua (liblua) License
A.25. LuaFileSystem Library License
A.26. md5 (Message-Digest Algorithm 5) License
A.27. nt_servc (Windows NT Service class library) License
A.28. OpenPAM License
A.29. PCRE License
A.30. Percona Multiple I/O Threads Patch License
A.31. RegEX-Spencer Library License
A.32. RFC 3174 - US Secure Hash Algorithm 1 (SHA1) License
A.33. Richard A. O'Keefe String Library License
A.34. SHA-1 in C License
A.35. Simple Logging Facade for Java (SLF4J) License
A.36. zlib License
A.37. ZLIB.NET License
B. MySQL 5.5 Frequently Asked Questions
B.1. MySQL 5.5 FAQ: General
B.2. MySQL 5.5 FAQ: Storage Engines
B.3. MySQL 5.5 FAQ: Server SQL Mode
B.4. MySQL 5.5 FAQ: Stored Procedures and Functions
B.5. MySQL 5.5 FAQ: Triggers
B.6. MySQL 5.5 FAQ: Views
B.7. MySQL 5.5 FAQ: INFORMATION_SCHEMA
B.8. MySQL 5.5 FAQ: Migration
B.9. MySQL 5.5 FAQ: Security
B.10. MySQL FAQ: MySQL 5.5 and MySQL Cluster
B.11. MySQL 5.5 FAQ: MySQL Chinese, Japanese, and Korean Character Sets
B.12. MySQL 5.5 FAQ: Connectors & APIs
B.13. MySQL 5.5 FAQ: Replication
B.14. MySQL 5.5 FAQ: MySQL Enterprise Scalability Thread Pool
B.15. MySQL 5.5 FAQ: MySQL, DRBD, and Heartbeat
B.15.1. Distributed Replicated Block Device (DRBD)
B.15.2. Linux Heartbeat
B.15.3. DRBD Architecture
B.15.4. DRBD and MySQL Replication
B.15.5. DRBD and File Systems
B.15.6. DRBD and LVM
B.15.7. DRBD and Virtualization
B.15.8. DRBD and Security
B.15.9. DRBD and System Requirements
B.15.10. DRBD and Support and Consulting
C. Errors, Error Codes, and Common Problems
C.1. Sources of Error Information
C.2. Types of Error Values
C.3. Server Error Codes and Messages
C.4. Client Error Codes and Messages
C.5. Problems and Common Errors
C.5.1. How to Determine What Is Causing a Problem
C.5.2. Common Errors When Using MySQL Programs
C.5.3. Installation-Related Issues
C.5.4. Administration-Related Issues
C.5.5. Query-Related Issues
C.5.6. Optimizer-Related Issues
C.5.7. Table Definition-Related Issues
C.5.8. Known Issues in MySQL
D. MySQL Change History
D.1. Changes in Release 5.5.x (Production)
D.1.1. Changes in MySQL 5.5.26 (Not yet released)
D.1.2. Changes in MySQL 5.5.25 (30 May 2012)
D.1.3. Changes in MySQL 5.5.24 (07 May 2012)
D.1.4. Changes in MySQL 5.5.23 (12 April 2012)
D.1.5. Changes in MySQL 5.5.22 (21 March 2012)
D.1.6. Changes in MySQL 5.5.21 (17 February 2012)
D.1.7. Changes in MySQL 5.5.20 (10 January 2012)
D.1.8. Changes in MySQL 5.5.19 (08 December 2011)
D.1.9. Changes in MySQL 5.5.18 (16 November 2011)
D.1.10. Changes in MySQL 5.5.17 (19 October 2011)
D.1.11. Changes in MySQL 5.5.16 (15 September 2011)
D.1.12. Changes in MySQL 5.5.15 (28 July 2011)
D.1.13. Changes in MySQL 5.5.14 (05 July 2011)
D.1.14. Changes in MySQL 5.5.13 (31 May 2011)
D.1.15. Changes in MySQL 5.5.12 (05 May 2011)
D.1.16. Changes in MySQL 5.5.11 (07 April 2011)
D.1.17. Changes in MySQL 5.5.10 (15 March 2011)
D.1.18. Changes in MySQL 5.5.9 (07 February 2011)
D.1.19. Changes in MySQL 5.5.8 (03 December 2010, General Availability)
D.1.20. Changes in MySQL 5.5.7 (14 October 2010)
D.1.21. Changes in MySQL 5.5.6 (13 September 2010, Release Candidate)
D.1.22. Changes in MySQL 5.5.5 (06 July 2010)
D.1.23. Changes in MySQL 5.5.4 (09 April 2010)
D.1.24. Changes in MySQL 5.5.3 (24 March 2010, Milestone 3)
D.1.25. Changes in MySQL 5.5.2 (12 February 2010)
D.1.26. Changes in MySQL 5.5.1 (04 January 2010)
D.1.27. Changes in MySQL 5.5.0 (07 December 2009, Milestone 2)
D.2. MySQL Connector/ODBC (MyODBC) Change History
D.2.1. Changes in MySQL Connector/ODBC Version 5.1.x
D.2.2. Changes in MySQL Connector/ODBC Version 5.0.x
D.2.3. Changes in MySQL Connector/ODBC Version 3.51.x
D.3. MySQL Connector/Net Change History
D.3.1. Changes in MySQL Connector/Net Version 6.5.x
D.3.2. Changes in MySQL Connector/Net Version 6.4.x
D.3.3. Changes in MySQL Connector/Net Version 6.3.x
D.3.4. Changes in MySQL Connector/Net Version 6.2.x
D.3.5. Changes in MySQL Connector/Net Version 6.1.x
D.3.6. Changes in MySQL Connector/Net Version 6.0.x
D.3.7. Changes in MySQL Connector/Net Version 5.3.x
D.3.8. Changes in MySQL Connector/Net Version 5.2.x
D.3.9. Changes in MySQL Connector/Net Version 5.1.x
D.3.10. Changes in MySQL Connector/Net Version 5.0.x
D.3.11. Changes in MySQL Connector/Net Version 1.0.x
D.3.12. Changes in MySQL Connector/Net Version 0.9.0 (30 August 2004)
D.3.13. Changes in MySQL Connector/Net Version 0.76
D.3.14. Changes in MySQL Connector/Net Version 0.75
D.3.15. Changes in MySQL Connector/Net Version 0.74
D.3.16. Changes in MySQL Connector/Net Version 0.71
D.3.17. Changes in MySQL Connector/Net Version 0.70
D.3.18. Changes in MySQL Connector/Net Version 0.68
D.3.19. Changes in MySQL Connector/Net Version 0.65
D.3.20. Changes in MySQL Connector/Net Version 0.60
D.3.21. Changes in MySQL Connector/Net Version 0.50
D.4. MySQL Visual Studio Plugin Change History
D.4.1. Changes in MySQL Visual Studio Plugin 1.0.3 (Not yet released)
D.4.2. Changes in MySQL Visual Studio Plugin 1.0.2 (Not yet released)
D.4.3. Changes in MySQL Visual Studio Plugin 1.0.1 (04 October 2006)
D.4.4. Changes in MySQL Visual Studio Plugin 1.0.0 (04 October 2006)
D.5. MySQL Connector/J Change History
D.5.1. Changes in MySQL Connector/J 5.1.x
D.5.2. Changes in MySQL Connector/J 5.0.x
D.5.3. Changes in MySQL Connector/J 3.1.x
D.5.4. Changes in MySQL Connector/J 3.0.x
D.5.5. Changes in MySQL Connector/J 2.0.x
D.5.6. Changes in MySQL Connector/J 1.2.x and lower
D.6. MySQL Connector/C++ Change History
D.6.1. Changes in MySQL Connector/C++ 1.1.x
D.6.2. Changes in MySQL Connector/C++ 1.0.x
D.7. MySQL Proxy Change History
D.7.1. Changes in MySQL Proxy 0.8.2 (18 August 2011)
D.7.2. Changes in MySQL Proxy 0.8.1 (13 September 2010)
D.7.3. Changes in MySQL Proxy 0.8.0 (21 January 2010)
D.7.4. Changes in MySQL Proxy 0.7.2 (30 June 2009)
D.7.5. Changes in MySQL Proxy 0.7.1 (15 May 2009)
D.7.6. Changes in MySQL Proxy 0.7.0 (Not Released)
D.7.7. Changes in MySQL Proxy 0.6.1 (06 February 2008)
D.7.8. Changes in MySQL Proxy 0.6.0 (11 September 2007)
D.7.9. Changes in MySQL Proxy 0.5.1 (30 June 2007)
D.7.10. Changes in MySQL Proxy 0.5.0 (19 June 2007)
E. Restrictions and Limits
E.1. Restrictions on Stored Programs
E.2. Restrictions on Condition Handling
E.3. Restrictions on Server-Side Cursors
E.4. Restrictions on Subqueries
E.5. Restrictions on Views
E.6. Restrictions on XA Transactions
E.7. Restrictions on Character Sets
E.8. Restrictions on Performance Schema
E.9. Restrictions on Pluggable Authentication
E.10. Limits in MySQL
E.10.1. Limits of Joins
E.10.2. Limits on Number of Databases and Tables
E.10.3. Limits on Table Size
E.10.4. Table Column-Count and Row-Size Limits
E.10.5. Windows Platform Limitations
F. MySQL Glossary
General Index
C Function Index
Command Index
Function Index
INFORMATION_SCHEMA Index
Transaction Isolation Level Index
Join Types Index
Operator Index
Option Index
Privileges Index
SQL Modes Index
Status Variable Index
Statement/Syntax Index
System Variable Index

List of Figures

2.1. MySQL Installer - Welcome Screen
2.2. MySQL Installer - License Agreement
2.3. MySQL Installer - Find latest products
2.4. MySQL Installer - Choose Setup Type
2.5. MySQL Installer - Check Requirements
2.6. MySQL Installer - Installation Progress
2.7. MySQL Installer - Installation Progress status
2.8. MySQL Installer - Configuration Overview
2.9. MySQL Installer - MySQL Server Configuration: Choose a platform
2.10. MySQL Installer - MySQL Server Configuration: Basic settings
2.11. MySQL Installer - Installation Complete
2.12. MySQL Installer - Maintenance Screen
2.13. Installation Workflow for Windows using MSI Installer
5.1. The MySQL Architecture Using Pluggable Storage Engines
14.1. FEDERATED Table Structure
15.1. Tradeoffs: Cost and Complexity versus Availability
15.2. High Availability Architectures for Common Application Types
15.3. DRBD Architecture Overview
15.4. DRBD Architecture Using Separate Network Interfaces
15.5. Heartbeat Architecture
15.6. memcached Architecture Overview
15.7. memcached Hash Selection
15.8. memcached Hash Selection with New memcached instance
15.9. Memory Allocation in memcached
15.10. Typical memcached Application Flowchart
16.1. Using Replication to Improve Performance During Scale-Out
16.2. Using Replication to Replicate Databases to Separate Replication Slaves
16.3. Using an Additional Replication Host to Improve Performance
16.4. Redundancy Using Replication, Initial Structure
16.5. Redundancy Using Replication, After Master Failure
22.1. Add Connection Context Menu
22.2. Choose Data Source
22.3. Add Connection Dialog
22.4. New Data Connection
22.5. Editing New Table
22.6. Choose Table Name
22.7. Newly Created Table
22.8. Table Designer Main Menu
22.9. Indexes Dialog
22.10. Foreign Key Relationships Dialog
22.11. Table Properties Menu Item
22.12. Table Properties
22.13. Editing View SQL
22.14. View SQL Added
22.15. View SQL Saved
22.16. Edit Stored Procedure SQL
22.17. Stored Procedure SQL Saved
22.18. MySQL Website Configuration Tool
22.19. MySQL Website Configuration Tool - Membership
22.20. MySQL Website Configuration Tool - Connection String Editor
22.21. MySQL Website Configuration Tool - Advanced Options
22.22. MySQL Website Configuration Tool - Roles
22.23. MySQL Website Configuration Tool - Profiles
22.24. MySQL Website Configuration Tool - Session State
22.25. MySQL Website Configuration Tool - Tables
22.26. MySQL SQL Editor - New File
22.27. MySQL SQL Editor - Query
22.28. DDL T4 Template Macro - Model Properties
22.29. DDL T4 Template Macro - Generate Database Wizard
22.30. World Database Application
22.31. Authentication Type
22.32. Select Membership and Role Provider
22.33. Membership and Role Provider Tables
22.34. Security Tab
22.35. Create User
22.36. Membership and Roles Table Contents
22.37. Simple Profile Application
22.38. Add Entity Data Model
22.39. Entity Data Model Wizard Screen 1
22.40. Entity Data Model Wizard Screen 2
22.41. Entity Data Model Wizard Screen 3
22.42. Entity Data Model Diagram
22.43. Entity Data Source Configuration Wizard Screen 1
22.44. Entity Data Source Configuration Wizard Screen 2
22.45. Entity Data Source Configuration Wizard Screen 3
22.46. Data Sources
22.47. Data Form Designer
22.48. Adding Code to the Form
22.49. The Populated Grid Control
22.50. Save Button Enabled
22.51. Adding Save Code to the Form
22.52. The Design Tab
22.53. Drop Down List
22.54. Enable AutoPostBack
22.55. Grid View Control
22.56. Placed Grid Vew Control
22.57. Source Code
22.58. The Working Web Site
22.59. Windows Installer Welcome Screen
22.60. Windows Installer Overview Screen
22.61. Windows Installer Custom Setup Screen
22.62. Creating a New Project
22.63. The New Project Dialog Box
22.64. The Win32 Application Wizard
22.65. Selecting the Release Build
22.66. Selecting Project Properties from the Main Menu
22.67. Setting Properties
22.68. MySQL Include Directory
22.69. Select Directory Dialog
22.70. Typical Contents of MySQL lib/opt Directory
22.71. Additional Library Directories
22.72. Additional Library Directories Dialog
22.73. Additional Dependencies
22.74. Adding Additional Dependencies
22.75. Setting the CPPCONN_PUBLIC_FUNC Define
22.76. The NetBeans IDE
22.77. Setting the Header Include Directory
22.78. Setting the Static Library Directories and File Names
22.79. Setting the Dynamic Library Directory and File Name
22.80. The Example Application Running
22.81. Adding an Extension
22.82. Selecting the Database
22.83. Selecting the connection type
22.84. Entering Connection Settings
22.85. Setting Up User Authentication
22.86. After Connecting to the Database
22.87. Entering the Database File Name
22.88. Listing Tables
B.1. Active-Master MySQL Server

List of Tables

2.1. MySQL Package and Signature Files
2.2. MySQL Installation Layout for Generic Unix/Linux Binary Package
2.3. MySQL Installation Layout for Windows
2.4. MySQL Server Instance Config Wizard Command Line Options
2.5. MySQL Server Instance Config Wizard Parameters
2.6. Return Value from MySQL Server Instance Config Wizard
2.7. MySQL Unix Socket Locations on Mac OS X by Installation Type
2.8. MySQL Installation Layout on Mac OS X
2.9. MySQL Versions Preinstalled with Mac OS X Server
2.10. MySQL Directory Layout for Preinstalled MySQL Installations on Mac OS X Server
2.11. MySQL Installation Layout for Linux RPM
2.12. MySQL Linux Installation Packages
2.13. MySQL Installation Packages for Linux CPU Identifier
2.14. MySQL Source-Configuration Option Reference (CMake)
2.15. MySQL Startup scripts and supported server option groups
4.1. mysqld_safe Options
4.2. mysql Options
4.3. mysqladmin Options
4.4. mysqlcheck Options
4.5. mysqldump Options
4.6. mysqlimport Options
4.7. mysqlshow Options
4.8. mysqlslap Options
4.9. myisamchk Options
4.10. mysqlaccess Options
4.11. mysqlbinlog Options
4.12. mysqldumpslow Options
4.13. mysqlhotcopy Options
5.1. Option/Variable Summary
5.2. System Variable Summary
5.3. Dynamic Variable Summary
5.4. Status Variable Summary
5.5. MySQL DTrace Probes
6.1. Security Option/Variable Summary
6.2. Permissible Privileges for GRANT and REVOKE
6.3. user and db Table Columns
6.4. tables_priv and columns_priv Table Columns
6.5. procs_priv Table Columns
6.6. Grant Table Scope Column Types
6.7. Set-Type Privilege Column Values
6.8. MySQL Native Password Authentication Plugin
6.9. MySQL Native Old-Password Authentication Plugin
6.10. MySQL PAM Authentication Plugin
6.11. MySQL Windows Authentication Plugin
6.12. MySQL Clear Text Authentication Plugin
6.13. MySQL Socket Peer-Credential Authentication Plugin
6.14. MySQL Test Authentication Plugin
6.15. SSL Option/Variable Summary
8.1. EXPLAIN Output Columns
9.1. Special Character Escape Sequences
9.2. Reserved Words in MySQL 5.5.25
9.3. New Reserved Words in MySQL 5.5
10.1. MySQL Character Sets Available for User-Defined UCA Collations
12.1. Functions/Operators
12.2. Operators
12.3. Comparison Operators
12.4. Logical Operators
12.5. Assignment Operators
12.6. Flow Control Operators
12.7. String Operators
12.8. String Comparison Operators
12.9. String Regular Expression Operators
12.10. Numeric Functions and Operators
12.11. Arithmetic Operators
12.12. Mathematical Functions
12.13. Date/Time Functions
12.14. Cast Functions
12.15. XML Functions
12.16. Bitwise Functions
12.17. Encryption Functions
12.18. Information Functions
12.19. Miscellaneous Functions
12.20. Aggregate (GROUP BY) Functions
13.1. Permissible Privileges for GRANT and REVOKE
14.1. Storage Engines Feature Summary
14.2. InnoDB Storage Engine Features
14.3. InnoDB Option/Variable Reference
14.4. Meaning of CREATE TABLE and ALTER TABLE options
14.5. CREATE/ALTER TABLE Warnings and Errors when InnoDB Strict Mode is OFF
14.6. InnoDB Data File Compatibility and Related InnoDB Parameters
14.7. Changes to innodb_thread_concurrency
14.8. InnoDB 1.1 New Parameter Summary
14.9. InnoDB Parameters with New Defaults
14.10. MyISAM Storage Engine Features
14.11. MyISAM Option/Variable Reference
14.12. MEMORY Storage Engine Features
14.13. ARCHIVE Storage Engine Features
15.1. memcached Command Reference
15.2. memcached Protocol Responses
15.3. mysql-proxy Help Options
15.4. mysql-proxy Admin Options
15.5. mysql-proxy Proxy Options
15.6. mysql-proxy Applications Options
16.1. Replication Option/Variable Summary
16.2. Binary Logging Option/Variable Summary
17.1. Data Node Configuration Parameters
17.2. Multi-Threaded Data Node Configuration Parameters
17.3. Management Node Configuration Parameters
17.4. SQL Node / API Node Configuration Parameters
17.5. COMPUTER Configuration Parameters
17.6. TCP Configuration Parameters
17.7. SHM Configuration Parameters
17.8. SCI Configuration Parameters
17.9. Computer Configuration Parameters
17.10. TCP Configuration Parameters
17.11. Shared Memory Configuration Parameters
17.12. SCI Configuration Parameters
17.13. MySQL Server Option and Variable Reference for MySQL Cluster
17.14. ndbd Command Line Options
17.15. ndbinfo_select_all Command Line Options
17.16. ndb_mgmd Command Line Options
17.17. ndb_mgm Command Line Options
17.18. ndb_config Command Line Options
17.19. ndb_index_stat Command Line Options
17.20. ndbd_redo_log_reader Command Line Options
17.21. ndb_restore Command Line Options
17.22. ndb_show_tables Command Line Options
17.23. ndb_size.pl Command Line Options
17.24. ndb_waiter Command Line Options
17.25. Command Line Options Common to MySQL Cluster Programs
20.1. Columns of INNODB_CMP and INNODB_CMP_RESET
20.2. Columns of INNODB_CMPMEM and INNODB_CMPMEM_RESET
20.3. INNODB_TRX Columns
20.4. INNODB_LOCKS Columns
20.5. INNODB_LOCK_WAITS Columns
20.6. WAIT_TYPE Values
21.1. Performance Schema Variable Reference
22.1. MySQL APIs and Interfaces
22.2. MySQL Connector Versions and MySQL Server Versions
22.3. Connector/ODBC DSN Configuration Options
22.4. Connector/ODBC Option Flags
22.5. Connector/Net Requirements for Related Products
22.6. Connector/Net Connection String Options - General
22.7. Connector/Net Connection String Options - Connection Pooling
22.8. Mapping of MySQL Error Numbers to SQLStates
22.9. C API Function Names and Descriptions
22.10. ext/mysql compile time support matrix
22.11. MySQL Configuration Options
22.12. MySQL client constants
22.13. MySQL fetch constants
22.14. mysqli compile time support matrix
22.15. MySQLi Configuration Options
22.16. Possible mysqli_info return values
22.17. Valid options
22.18. Supported flags
22.19. Attribute values
22.20. Type specification chars
22.21. Return Values
22.22. Changelog
22.23. Object attributes
22.24. Object properties
22.25. Object properties
22.26. Supported flags
22.27. Changelog
22.28. PDO_MYSQL Configuration Options
22.29. Changelog
22.30. MySQL Native Driver Configuration Options
22.31. Mysqlnd_ms Configure Options
22.32. mysqlnd_qc Configure Options
22.33. Mysqlnd_uh Configure Options
23.1. Server Plugin Status Variable Types
23.2. Server Plugin System Variable Flags
23.3. Full-Text Parser Token Types

List of Examples

14.1. Using the Compression Information Schema Tables
14.2. Identifying Blocking Transactions
14.3. More Complex Example of Transaction Data in Information Schema Tables
22.1. Connector/J: Obtaining a connection from the DriverManager
22.2. Connector/J: Using java.sql.Statement to execute a SELECT query
22.3. Connector/J: Calling Stored Procedures
22.4. Connector/J: Using Connection.prepareCall()
22.5. Connector/J: Registering output parameters
22.6. Connector/J: Setting CallableStatement input parameters
22.7. Connector/J: Retrieving results and output parameter values
22.8. Connector/J: Retrieving AUTO_INCREMENT column values using Statement.getGeneratedKeys()
22.9. Connector/J: Retrieving AUTO_INCREMENT column values using SELECT LAST_INSERT_ID()
22.10. Connector/J: Retrieving AUTO_INCREMENT column values in Updatable ResultSets
22.11. Connector/J: Using a connection pool with a J2EE application server
22.12. Connector/J: Example of transaction with retry logic
22.13. Comparing the three MySQL APIs
22.14. Configure commands for using mysqlnd or libmysql
22.15. Unbuffered query example: mysqli
22.16. Unbuffered query example: pdo_mysql
22.17. Unbuffered query example: mysql
22.18. Problems with setting the character set with SQL
22.19. Setting the character set example: mysqli
22.20. Setting the character set example: pdo_mysql
22.21. Setting the character set example: mysql
22.22. MySQL extension overview example
22.23. mysql_affected_rows example
22.24. mysql_affected_rows example using transactions
22.25. mysql_client_encoding example
22.26. mysql_close example
22.27. mysql_connect example
22.28. mysql_connect example using hostname:port syntax
22.29. mysql_connect example using ":/path/to/socket" syntax
22.30. mysql_create_db alternative example
22.31. mysql_data_seek example
22.32. mysql_db_name example
22.33. mysql_db_query alternative example
22.34. mysql_drop_db alternative example
22.35. mysql_errno example
22.36. mysql_error example
22.37. mysql_escape_string example
22.38. Query with aliased duplicate field names
22.39. mysql_fetch_array with MYSQL_NUM
22.40. mysql_fetch_array with MYSQL_ASSOC
22.41. mysql_fetch_array with MYSQL_BOTH
22.42. An expanded mysql_fetch_assoc example
22.43. mysql_fetch_field example
22.44. A mysql_fetch_lengths example
22.45. mysql_fetch_object example
22.46. mysql_fetch_object example
22.47. Fetching one row with mysql_fetch_row
22.48. A mysql_field_flags example
22.49. mysql_field_len example
22.50. mysql_field_name example
22.51. A mysql_field_table example
22.52. mysql_field_type example
22.53. A mysql_free_result example
22.54. mysql_get_client_info example
22.55. mysql_get_host_info example
22.56. mysql_get_proto_info example
22.57. mysql_get_server_info example
22.58. Relevant MySQL Statements
22.59. mysql_insert_id example
22.60. mysql_list_dbs example
22.61. Alternate to deprecated mysql_list_fields
22.62. mysql_list_processes example
22.63. mysql_list_tables alternative example
22.64. A mysql_num_fields example
22.65. mysql_num_rows example
22.66. A mysql_ping example
22.67. Invalid Query
22.68. Valid Query
22.69. Simple mysql_real_escape_string example
22.70. An example SQL Injection Attack
22.71. mysql_result example
22.72. mysql_select_db example
22.73. mysql_stat example
22.74. Alternative mysql_stat example
22.75. mysql_tablename example
22.76. mysql_thread_id example
22.77. Easy migration from the old mysql extension
22.78. Object-oriented and procedural interface
22.79. Bad coding style
22.80. Special meaning of localhost
22.81. Setting defaults
22.82. Bad coding style
22.83. Navigation through buffered results
22.84. Navigation through buffered results
22.85. Text protocol returns strings by default
22.86. Native data types with mysqlnd and connection option
22.87. First stage: prepare
22.88. Second stage: bind and execute
22.89. INSERT prepared once, executed multiple times
22.90. Less round trips using multi-INSERT SQL
22.91. Native datatypes
22.92. Output variable binding
22.93. Using mysqli_result to fetch results
22.94. Buffered result set for flexible read out
22.95. Calling a stored procedure
22.96. Using session variables
22.97. Fetching results from stored procedures
22.98. Stored Procedures and Prepared Statements
22.99. Stored Procedures and Prepared Statements using bind API
22.100. Multiple Statements
22.101. SQL Injection
22.102. Setting auto commit mode with SQL and through the API
22.103. Commit and rollback
22.104. Accessing result set meta data
22.105. Prepared statements metadata
22.106. $mysqli->affected_rows example
22.107. mysqli::autocommit example
22.108. mysqli::change_user example
22.109. mysqli::character_set_name example
22.110. mysqli_get_client_info
22.111. mysqli_get_client_version
22.112. mysqli::commit example
22.113. $mysqli->connect_errno example
22.114. $mysqli->connect_error example
22.115. mysqli::__construct example
22.116. Generating a Trace File
22.117. $mysqli->errno example
22.118. $mysqli->error_list example
22.119. $mysqli->error example
22.120. $mysqli->field_count example
22.121. mysqli::get_charset example
22.122. mysqli_get_client_info
22.123. A mysqli_get_client_stats example
22.124. mysqli_get_client_version
22.125. A mysqli_get_connection_stats example
22.126. $mysqli->host_info example
22.127. $mysqli->protocol_version example
22.128. $mysqli->server_info example
22.129. $mysqli->server_version example
22.130. $mysqli->info example
22.131. $mysqli->insert_id example
22.132. mysqli::kill example
22.133. mysqli::multi_query example
22.134. mysqli::ping example
22.135. A mysqli_poll example
22.136. mysqli::prepare example
22.137. mysqli::query example
22.138. mysqli::real_connect example
22.139. mysqli::real_escape_string example
22.140. mysqli::rollback example
22.141. mysqli::select_db example
22.142. mysqli::set_charset example
22.143. mysqli::set_local_infile_handler example
22.144. $mysqli->sqlstate example
22.145. mysqli::stat example
22.146. $mysqli->thread_id example
22.147. mysqli::use_result example
22.148. $mysqli->warning_count example
22.149. Object oriented style
22.150. Procedural style
22.151. Object oriented style
22.152. Procedural style
22.153. Object oriented style
22.154. Procedural style
22.155. Object oriented style
22.156. Procedural style
22.157. Object oriented style
22.158. Procedural style
22.159. Object oriented style
22.160. Procedural style
22.161. Object oriented style
22.162. Procedural style
22.163. Object oriented style
22.164. Procedural style
22.165. Object oriented style
22.166. Procedural style
22.167. Object oriented style
22.168. Procedural style
22.169. Object oriented style
22.170. Procedural style
22.171. Object oriented style
22.172. Procedural style
22.173. Object oriented style
22.174. Procedural style
22.175. Object oriented style
22.176. Procedural style
22.177. Object oriented style
22.178. Object oriented style
22.179. Procedural style
22.180. Object oriented style
22.181. Procedural style
22.182. Object oriented style
22.183. Procedural style
22.184. Object oriented style
22.185. Procedural style
22.186. Object oriented style
22.187. Procedural style
22.188. Object oriented style
22.189. Procedural style
22.190. A mysqli_result example comparing iterator usage
22.191. Object oriented style
22.192. Procedural style
22.193. Object oriented style
22.194. Procedural style
22.195. Object oriented style
22.196. Procedural style
22.197. Object oriented style
22.198. Procedural style
22.199. Object oriented style
22.200. Procedural style
22.201. Object oriented style
22.202. Procedural style
22.203. Object oriented style
22.204. Procedural style
22.205. Object oriented style
22.206. Procedural style
22.207. Object oriented style
22.208. Procedural style
22.209. A mysqli_get_cache_stats example
22.210. Object oriented style
22.211. Forcing queries to be buffered in mysql
22.212. Setting the connection character set to UTF-8 prior to PHP 5.3.6
22.213. PDO_MYSQL DSN examples
22.214. Enabling the plugin (php.ini)
22.215. Minimal plugin-specific configuration file (mysqlnd_ms_plugin.ini)
22.216. Recommended minimal plugin-specific config (mysqlnd_ms_plugin.ini)
22.217. Using one server as a master and as a slave (testing only!)
22.218. Plugin specific configuration file (mysqlnd_ms_plugin.ini)
22.219. Opening a load balanced connection
22.220. Executing statements
22.221. Plugin config with one slave and one master
22.222. Pitfall: connection state and SQL user variables
22.223. Plugin config with one slave and one master
22.224. SQL hints to prevent connection switches
22.225. Fighting replication lag
22.226. Table creation on a slave
22.227. Plugin config with one slave and one master
22.228. Using SQL hints for transactions
22.229. Transaction aware load balancing: trx_stickiness setting
22.230. Transaction aware
22.231. Session consistency: read your writes
22.232. Requesting session consistency
22.233. Maximum age/slave lag
22.234. Limiting slave lag
22.235. Fail over not set
22.236. No slave within time limit
22.237. Create counter table on master
22.238. Plugin config: SQL for client-side GTID injection
22.239. Transparent global transaction ID injection
22.240. Plugin config: SQL for fetching GTID
22.241. Obtaining GTID after injection
22.242. Plugin config: Checking for a certain GTID
22.243. Session consistency service level and GTID combined
22.244. Plugin config: using MySQL 5.6.5-m8 built-in GTID feature
22.245. Recap: quality of service to request read your writes
22.246. Plugin config: no special entries for caching
22.247. Caching a slave request
22.248. Read your writes and caching combined
22.249. Provoking a connection error
22.250. Connection error on query execution
22.251. Provoking a connection error
22.252. Most basic failover
22.253. Converting a PHP array (hash) into JSON format
22.254. Using section names example
22.255. List of anonymous slaves
22.256. Master list using symbolic names
22.257. Keywords to configure a server
22.258. New roundrobin filter, old functionality
22.259. The user filter replaces mysqlnd_ms_set_user_pick_server
22.260. Invalid filter sequence
22.261. Random load balancing with random filter
22.262. Random once load balancing with random filter
22.263. roundrobin filter
22.264. Setting a callback
22.265. Using a callback
22.266. Returning random masters and slaves
22.267. Global limit on slave lag
22.268. Optional master failover when failing to connect to slave
22.269. Disabling lazy connection
22.270. String escaping on a lazy connection handle
22.271. Master on write for consistent reads
22.272. Using master to execute transactions
22.273. Using section names example
22.274. List-like syntax
22.275. Verify plugin activity in a non-threaded deployment model
22.276. Recording statistics during shutdown
22.277. Example demonstrating the usage of mysqlnd_ms constants
22.278. mysqlnd_ms_get_last_gtid example
22.279. mysqlnd_ms_get_last_used_connection example
22.280. mysqlnd_ms_get_stats example
22.281. mysqlnd_ms_match_wild example
22.282. mysqlnd_ms_query_is_select example
22.283. mysqlnd_ms_set_qos example
22.284. mysqlnd_ms_set_user_pick_server example
22.285. Enabling the plugin (php.ini)
22.286. Using the MYSQLND_QC_ENABLE_SWITCH SQL hint
22.287. Using the MYSQLND_QC_DISABLE_SWITCH SQL hint
22.288. Example showing which type of statements are not cached
22.289. Enabling caching for all statements using the mysqlnd_qc.cache_no_table ini setting
22.290. Setting the TTL with the mysqlnd_qc.ttl ini setting
22.291. Setting TTL with SQL hints
22.292. Setting a callback with mysqlnd_qc_set_is_select
22.293. Enabling the slam defense mechanism
22.294. Collecting a query trace
22.295. Setting the backtrace depth with the mysqlnd_qc.query_trace_bt_depth ini setting
22.296. Collecting statistics data with the mysqlnd_qc.time_statistics ini setting
22.297. Example mysqlnd_qc_get_cache_info usage
22.298. Example mysqlnd_qc_get_normalized_query_trace_log usage
22.299. Using a user-defined storage handler
22.300. Using SQL hint constants
22.301. Example mysqlnd_qc_set_cache_condition usage
22.302. mysqlnd_qc_get_available_handlers example
22.303. mysqlnd_qc_get_cache_info example
22.304. mysqlnd_qc_get_core_stats example
22.305. mysqlnd_qc_get_normalized_query_trace_log example
22.306. mysqlnd_qc_get_query_trace_log example
22.307. mysqlnd_qc_set_cache_condition example
22.308. mysqlnd_qc_set_is_select example
22.309. mysqlnd_qc_set_storage_handler example
22.310. Enabling the plugin (php.ini)
22.311. Pseudo-code: what a built-in class does
22.312. Installing a proxy
22.313. Proxy registration, mysqlnd_uh.enable=1
22.314. Proxy installation disabled
22.315. Connection proxy
22.316. Prepared statement proxy
22.317. Basic Monitoring
22.318. MysqlndUhConnection::changeUser example
22.319. MysqlndUhConnection::charsetName example
22.320. MysqlndUhConnection::close example
22.321. MysqlndUhConnection::connect example
22.322. MysqlndUhConnection::endPSession example
22.323. MysqlndUhConnection::escapeString example
22.324. MysqlndUhConnection::getAffectedRows example
22.325. MysqlndUhConnection::getErrorNumber example
22.326. MysqlndUhConnection::getErrorString example
22.327. MysqlndUhConnection::getFieldCount example
22.328. MysqlndUhConnection::getHostInformation example
22.329. MysqlndUhConnection::getLastInsertId example
22.330. MysqlndUhConnection::getLastMessage example
22.331. MysqlndUhConnection::getProtocolInformation example
22.332. MysqlndUhConnection::getServerInformation example
22.333. MysqlndUhConnection::getServerStatistics example
22.334. MysqlndUhConnection::getServerVersion example
22.335. MysqlndUhConnection::getSqlstate example
22.336. MysqlndUhConnection::getStatistics example
22.337. MysqlndUhConnection::getThreadId example
22.338. MysqlndUhConnection::getWarningCount example
22.339. MysqlndUhConnection::init example
22.340. MysqlndUhConnection::kill example
22.341. MysqlndUhConnection::listFields example
22.342. MysqlndUhConnection::listMethod example
22.343. MysqlndUhConnection::moreResults example
22.344. MysqlndUhConnection::nextResult example
22.345. MysqlndUhConnection::ping example
22.346. MysqlndUhConnection::query example
22.347. MysqlndUhConnection::queryReadResultsetHeader example
22.348. MysqlndUhConnection::reapQuery example
22.349. MysqlndUhConnection::refreshServer example
22.350. MysqlndUhConnection::restartPSession example
22.351. MysqlndUhConnection::selectDb example
22.352. MysqlndUhConnection::sendClose example
22.353. MysqlndUhConnection::sendQuery example
22.354. MysqlndUhConnection::serverDumpDebugInformation example
22.355. MysqlndUhConnection::setAutocommit example
22.356. MysqlndUhConnection::setCharset example
22.357. MysqlndUhConnection::setClientOption example
22.358. MysqlndUhConnection::setServerOption example
22.359. MysqlndUhConnection::simpleCommand example
22.360. MysqlndUhConnection::simpleCommandHandleResponse example
22.361. MysqlndUhConnection::sslSet example
22.362. MysqlndUhConnection::stmtInit example
22.363. MysqlndUhConnection::storeResult example
22.364. MysqlndUhConnection::txCommit example
22.365. MysqlndUhConnection::txRollback example
22.366. MysqlndUhConnection::useResult example
22.367. MysqlndUhPreparedStatement::execute example
22.368. MysqlndUhPreparedStatement::prepare example
22.369. mysqlnd_uh_convert_to_mysqlnd example
22.370. mysqlnd_uh_set_connection_proxy example