MySQL 5.0 Reference Manual

Copyright 1997-2008 MySQL AB, 2008 Sun Microsystems, Inc.

This documentation is NOT distributed under a GPL license. Use of this documentation is subject to the following terms: You may create a printed copy of this documentation solely for your own personal use. Conversion to other formats is allowed as long as the actual content is not altered or edited in any way. You shall not publish or distribute this documentation in any form or on any media, except if you distribute the documentation in a manner similar to how Sun disseminates it (that is, electronically for download on a Web site with the software) or on a CD-ROM or similar medium, provided however that the documentation is disseminated together with the software on the same medium. Any other use, such as any dissemination of printed copies or use of this documentation, in whole or in part, in another publication, requires the prior written consent from an authorized representative of Sun Microsystems, Inc. Sun Microsystems, Inc. and MySQL AB reserve any and all rights to this documentation not expressly granted above.

For more information on the terms of this license, for details on how the MySQL documentation is built and produced, or if you are interested in doing a translation, please contact us at .

If you want help with using MySQL, please visit either the MySQL Forums or MySQL Mailing Lists where you can discuss your issues with other MySQL users.

For additional documentation on MySQL products, including translations of the documentation into other languages, and downloadable versions in variety of formats, including HTML, CHM and PDF formats, see MySQL Documentation Library.

Abstract

This is the MySQL Reference Manual. It documents MySQL 5.0 through 5.0.72.

This manual is for MySQL Enterprise Server, our commercial offering, and for MySQL Community Server. Sections that do not apply for MySQL Enterprise Server users are marked:

This section does not apply to MySQL Enterprise Server users.

Sections that do not apply to MySQL Community Server users are marked:

This section does not apply to MySQL Community Server users.

Document generated on: 2008-12-01 (revision: 12712)

The following table provides direct links into areas of the manual according to different topics. Links marked with » link to online guides and other manuals for more information.


Table of Contents

Preface
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. History of MySQL
1.3.3. The Main Features of MySQL
1.4. MySQL Development Roadmap
1.4.1. What's New in MySQL 5.0
1.5. MySQL Information Sources
1.5.1. MySQL Mailing Lists
1.5.2. MySQL Community Support at the MySQL Forums
1.5.3. MySQL Community Support on Internet Relay Chat (IRC)
1.5.4. MySQL Enterprise
1.6. How to Report Bugs or Problems
1.7. MySQL Standards Compliance
1.7.1. What Standards MySQL Follows
1.7.2. Selecting SQL Modes
1.7.3. Running MySQL in ANSI Mode
1.7.4. MySQL Extensions to Standard SQL
1.7.5. MySQL Differences from Standard SQL
1.7.6. How MySQL Deals with Constraints
1.8. Credits
1.8.1. Developers at MySQL AB
1.8.2. Contributors to MySQL
1.8.3. Documenters and translators
1.8.4. Libraries used by and included with MySQL
1.8.5. Packages that support MySQL
1.8.6. Tools that were used to create MySQL
1.8.7. Supporters of MySQL
2. Installing and Upgrading MySQL
2.1. MySQL Installation Overview
2.2. Determining your current MySQL version
2.3. Notes for MySQL Enterprise Server
2.3.1. Enterprise Server Distribution Types
2.3.2. Upgrading MySQL Enterprise Server
2.4. Notes for MySQL Community Server
2.4.1. Overview of MySQL Community Server Installation
2.4.2. Operating Systems Supported by MySQL Community Server
2.4.3. Choosing Which MySQL Distribution to Install
2.5. How to Get MySQL
2.6. Verifying Package Integrity Using MD5 Checksums or GnuPG
2.6.1. Verifying the MD5 Checksum
2.6.2. Signature Checking Using GnuPG
2.6.3. Signature Checking Using RPM
2.7. Installation Layouts
2.8. Standard MySQL Installation Using a Binary Distribution
2.9. Installing MySQL on Windows
2.9.1. Choosing An Installation Package
2.9.2. Installing MySQL with the Automated Installer
2.9.3. Using the MySQL Installation Wizard
2.9.4. MySQL Server Configuration Wizard
2.9.5. Installing MySQL from a Noinstall Zip Archive
2.9.6. Extracting the Install Archive
2.9.7. Creating an Option File
2.9.8. Selecting a MySQL Server Type
2.9.9. Starting the Server for the First Time
2.9.10. Starting MySQL from the Windows Command Line
2.9.11. Starting MySQL as a Windows Service
2.9.12. Testing The MySQL Installation
2.9.13. Troubleshooting a MySQL Installation Under Windows
2.9.14. Upgrading MySQL on Windows
2.9.15. MySQL on Windows Compared to MySQL on Unix
2.10. Installing MySQL from RPM Packages on Linux
2.11. Installing MySQL on Mac OS X
2.12. Installing MySQL on Solaris
2.13. Installing MySQL on i5/OS
2.14. Installing MySQL on NetWare
2.15. Installing MySQL from tar.gz Packages on Other Unix-Like Systems
2.16. MySQL Installation Using a Source Distribution
2.16.1. Source Installation Overview
2.16.2. Typical configure Options
2.16.3. Installing from the Development Source Tree
2.16.4. Dealing with Problems Compiling MySQL
2.16.5. MIT-pthreads Notes
2.16.6. Installing MySQL from Source on Windows
2.16.7. Compiling MySQL Clients on Windows
2.17. Post-Installation Setup and Testing
2.17.1. Windows Post-Installation Procedures
2.17.2. Unix Post-Installation Procedures
2.17.3. Securing the Initial MySQL Accounts
2.18. Upgrading MySQL
2.18.1. Upgrading from MySQL 5.0 to 5.0.10 or Higher
2.18.2. Upgrading from MySQL 4.1 to 5.0
2.18.3. Copying MySQL Databases to Another Machine
2.19. Downgrading MySQL
2.19.1. Downgrading to MySQL 4.1
2.20. Operating System-Specific Notes
2.20.1. Linux Notes
2.20.2. Mac OS X Notes
2.20.3. Solaris Notes
2.20.4. BSD Notes
2.20.5. Other Unix Notes
2.20.6. OS/2 Notes
2.21. Environment Variables
2.22. Perl Installation Notes
2.22.1. Installing Perl on Unix
2.22.2. Installing ActiveState Perl on Windows
2.22.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 Field
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. Queries from the Twin Project
3.7.1. Find All Non-distributed Twins
3.7.2. Show a Table of Twin Pair Status
3.8. 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. make_win_bin_dist — Package MySQL Distribution as ZIP Archive
4.4.3. make_win_src_distribution — Create Source Distribution for Windows
4.4.4. mysqlbug — Generate Bug Report
4.4.5. mysql_fix_privilege_tables — Upgrade MySQL System Tables
4.4.6. mysql_install_db — Initialize MySQL Data Directory
4.4.7. mysql_secure_installation — Improve MySQL Installation Security
4.4.8. mysql_tzinfo_to_sql — Load the Time Zone Tables
4.4.9. 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 and Repair 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.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. mysqlhotcopy — A Database Backup Program
4.6.9. mysqlmanager — The MySQL Instance Manager
4.6.10. mysql_convert_table_format — Convert Tables to Use a Given Storage Engine
4.6.11. mysql_explain_log — Use EXPLAIN on Statements in Query Log
4.6.12. mysql_find_rows — Extract SQL Statements from Files
4.6.13. mysql_fix_extensions — Normalize Table Filename Extensions
4.6.14. mysql_setpermission — Interactively Set Permissions in Grant Tables
4.6.15. mysql_tableinfo — Generate Database Metadata
4.6.16. mysql_waitpid — Kill Process and Wait for Its Termination
4.6.17. 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 Hostname 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. Session System Variables
5.1.5. Using System Variables
5.1.6. Server Status Variables
5.1.7. Server SQL Modes
5.1.8. Server-Side Help
5.1.9. Server Response to Signals
5.1.10. The Shutdown Process
5.2. MySQL Server Logs
5.2.1. The Error Log
5.2.2. The General Query Log
5.2.3. The Binary Log
5.2.4. The Slow Query Log
5.2.5. Server Log Maintenance
5.3. General Security Issues
5.3.1. General Security Guidelines
5.3.2. Making MySQL Secure Against Attackers
5.3.3. Security-Related mysqld Options
5.3.4. Security Issues with LOAD DATA LOCAL
5.3.5. How to Run MySQL as a Normal User
5.4. The MySQL Access Privilege System
5.4.1. What the Privilege System Does
5.4.2. How the Privilege System Works
5.4.3. Privileges Provided by MySQL
5.4.4. Access Control, Stage 1: Connection Verification
5.4.5. Access Control, Stage 2: Request Verification
5.4.6. When Privilege Changes Take Effect
5.4.7. Causes of Access denied Errors
5.4.8. Password Hashing as of MySQL 4.1
5.5. MySQL User Account Management
5.5.1. MySQL Usernames and Passwords
5.5.2. Adding New User Accounts to MySQL
5.5.3. Removing User Accounts from MySQL
5.5.4. Limiting Account Resources
5.5.5. Assigning Account Passwords
5.5.6. Keeping Passwords Secure
5.5.7. Using SSL for Secure Connections
5.5.8. Auditing MySQL Account Activity
5.6. Running Multiple MySQL Servers on the Same Machine
5.6.1. Running Multiple Servers on Windows
5.6.2. Running Multiple Servers on Unix
5.6.3. Using Client Programs in a Multiple-Server Environment
6. Backup and Recovery
6.1. Database Backups
6.2. Example Backup and Recovery Strategy
6.2.1. Backup Policy
6.2.2. Using Backups for Recovery
6.2.3. Backup Strategy Summary
6.3. Point-in-Time Recovery
6.3.1. Specifying Times for Recovery
6.3.2. Specifying Positions for Recovery
6.4. Table Maintenance and Crash Recovery
6.4.1. Using myisamchk for Crash Recovery
6.4.2. How to Check MyISAM Tables for Errors
6.4.3. How to Repair Tables
6.4.4. Table Optimization
6.4.5. Getting Information About a Table
6.4.6. Setting Up a Table Maintenance Schedule
7. Optimization
7.1. Optimization Overview
7.1.1. MySQL Design Limitations and Tradeoffs
7.1.2. Designing Applications for Portability
7.1.3. What We Have Used MySQL For
7.1.4. The MySQL Benchmark Suite
7.1.5. Using Your Own Benchmarks
7.2. Optimizing SELECT and Other Statements
7.2.1. Optimizing Queries with EXPLAIN
7.2.2. Estimating Query Performance
7.2.3. Speed of SELECT Queries
7.2.4. WHERE Clause Optimization
7.2.5. Range Optimization
7.2.6. Index Merge Optimization
7.2.7. Condition Pushdown Optimization
7.2.8. IS NULL Optimization
7.2.9. LEFT JOIN and RIGHT JOIN Optimization
7.2.10. Nested Join Optimization
7.2.11. Outer Join Simplification
7.2.12. ORDER BY Optimization
7.2.13. GROUP BY Optimization
7.2.14. DISTINCT Optimization
7.2.15. Optimizing IN/=ANY Subqueries
7.2.16. LIMIT Optimization
7.2.17. How to Avoid Table Scans
7.2.18. Speed of INSERT Statements
7.2.19. Speed of UPDATE Statements
7.2.20. Speed of DELETE Statements
7.2.21. Other Optimization Tips
7.3. Locking Issues
7.3.1. Internal Locking Methods
7.3.2. Table Locking Issues
7.3.3. Concurrent Inserts
7.3.4. External Locking
7.4. Optimizing Database Structure
7.4.1. Design Choices
7.4.2. Make Your Data as Small as Possible
7.4.3. Column Indexes
7.4.4. Multiple-Column Indexes
7.4.5. How MySQL Uses Indexes
7.4.6. The MyISAM Key Cache
7.4.7. MyISAM Index Statistics Collection
7.4.8. How MySQL Opens and Closes Tables
7.4.9. Disadvantages of Creating Many Tables in the Same Database
7.5. Optimizing the MySQL Server
7.5.1. System Factors and Startup Parameter Tuning
7.5.2. Tuning Server Parameters
7.5.3. Controlling Query Optimizer Performance
7.5.4. The MySQL Query Cache
7.5.5. Examining Thread Information
7.5.6. How Compiling and Linking Affects the Speed of MySQL
7.5.7. How MySQL Uses Threads for Client Connections
7.5.8. How MySQL Uses Memory
7.5.9. How MySQL Uses Internal Temporary Tables
7.5.10. How MySQL Uses DNS
7.6. Disk Issues
7.6.1. Using Symbolic Links
8. Language Structure
8.1. Literal Values
8.1.1. Strings
8.1.2. Numbers
8.1.3. Hexadecimal Values
8.1.4. Boolean Values
8.1.5. Bit-Field Values
8.1.6. NULL Values
8.2. Schema Object Names
8.2.1. Identifier Qualifiers
8.2.2. Identifier Case Sensitivity
8.2.3. Function Name Parsing and Resolution
8.3. Reserved Words
8.4. User-Defined Variables
8.5. Comment Syntax
9. Internationalization and Localization
9.1. Character Set Support
9.1.1. Character Sets and Collations in General
9.1.2. Character Sets and Collations in MySQL
9.1.3. Specifying Character Sets and Collations
9.1.4. Connection Character Sets and Collations
9.1.5. Configuring the Character Set and Collation for Applications
9.1.6. Collation Issues
9.1.7. String Repertoire
9.1.8. Operations Affected by Character Set Support
9.1.9. Unicode Support
9.1.10. UTF-8 for Metadata
9.1.11. Column Character Set Conversion
9.1.12. Character Sets and Collations That MySQL Supports
9.2. The Character Set Used for Data and Sorting
9.2.1. Using the German Character Set
9.3. Setting the Error Message Language
9.4. Adding a New Character Set
9.4.1. The Character Definition Arrays
9.4.2. String Collating Support
9.4.3. Multi-Byte Character Support
9.5. How to Add a New Collation to a Character Set
9.5.1. Collation Implementation Types
9.5.2. Choosing a Collation ID
9.5.3. Adding a Simple Collation to an 8-Bit Character Set
9.5.4. Adding a UCA Collation to a Unicode Character Set
9.6. Problems With Character Sets
9.7. MySQL Server Time Zone Support
9.8. MySQL Server Locale Support
10. Data Types
10.1. Data Type Overview
10.1.1. Overview of Numeric Types
10.1.2. Overview of Date and Time Types
10.1.3. Overview of String Types
10.1.4. Data Type Default Values
10.2. Numeric Types
10.3. Date and Time Types
10.3.1. The DATETIME, DATE, and TIMESTAMP Types
10.3.2. The TIME Type
10.3.3. The YEAR Type
10.3.4. Year 2000 Issues and Date Types
10.4. String Types
10.4.1. The CHAR and VARCHAR Types
10.4.2. The BINARY and VARBINARY Types
10.4.3. The BLOB and TEXT Types
10.4.4. The ENUM Type
10.4.5. The SET Type
10.5. Data Type Storage Requirements
10.6. Choosing the Right Type for a Column
10.7. Using Data Types from Other Database Engines
11. Functions and Operators
11.1. Operator and Function Reference
11.2. Operators
11.2.1. Operator Precedence
11.2.2. Type Conversion in Expression Evaluation
11.2.3. Comparison Functions and Operators
11.2.4. Logical Operators
11.3. Control Flow Functions
11.4. String Functions
11.4.1. String Comparison Functions
11.4.2. Regular Expressions
11.5. Numeric Functions
11.5.1. Arithmetic Operators
11.5.2. Mathematical Functions
11.6. Date and Time Functions
11.7. What Calendar Is Used By MySQL?
11.8. Full-Text Search Functions
11.8.1. Natural Language Full-Text Searches
11.8.2. Boolean Full-Text Searches
11.8.3. Full-Text Searches with Query Expansion
11.8.4. Full-Text Stopwords
11.8.5. Full-Text Restrictions
11.8.6. Fine-Tuning MySQL Full-Text Search
11.9. Cast Functions and Operators
11.10. Other Functions
11.10.1. Bit Functions
11.10.2. Encryption and Compression Functions
11.10.3. Information Functions
11.10.4. Miscellaneous Functions
11.11. Functions and Modifiers for Use with GROUP BY Clauses
11.11.1. GROUP BY (Aggregate) Functions
11.11.2. GROUP BY Modifiers
11.11.3. GROUP BY and HAVING with Hidden Fields
11.12. Spatial Extensions
11.12.1. Introduction to MySQL Spatial Support
11.12.2. The OpenGIS Geometry Model
11.12.3. Supported Spatial Data Formats
11.12.4. Creating a Spatially Enabled MySQL Database
11.12.5. Analyzing Spatial Information
11.12.6. Optimizing Spatial Analysis
11.12.7. MySQL Conformance and Compatibility
11.13. Precision Math
11.13.1. Types of Numeric Values
11.13.2. DECIMAL Data Type Changes
11.13.3. Expression Handling
11.13.4. Rounding Behavior
11.13.5. Precision Math Examples
12. SQL Statement Syntax
12.1. Data Definition Statements
12.1.1. ALTER DATABASE Syntax
12.1.2. ALTER FUNCTION Syntax
12.1.3. ALTER PROCEDURE Syntax
12.1.4. ALTER TABLE Syntax
12.1.5. ALTER VIEW Syntax
12.1.6. CREATE DATABASE Syntax
12.1.7. CREATE FUNCTION Syntax
12.1.8. CREATE INDEX Syntax
12.1.9. CREATE PROCEDURE and CREATE FUNCTION Syntax
12.1.10. CREATE TABLE Syntax
12.1.11. CREATE TRIGGER Syntax
12.1.12. CREATE VIEW Syntax
12.1.13. DROP DATABASE Syntax
12.1.14. DROP FUNCTION Syntax
12.1.15. DROP INDEX Syntax
12.1.16. DROP PROCEDURE and DROP FUNCTION Syntax
12.1.17. DROP TABLE Syntax
12.1.18. DROP TRIGGER Syntax
12.1.19. DROP VIEW Syntax
12.1.20. RENAME TABLE Syntax
12.2. Data Manipulation Statements
12.2.1. CALL Syntax
12.2.2. DELETE Syntax
12.2.3. DO Syntax
12.2.4. HANDLER Syntax
12.2.5. INSERT Syntax
12.2.6. LOAD DATA INFILE Syntax
12.2.7. REPLACE Syntax
12.2.8. SELECT Syntax
12.2.9. Subquery Syntax
12.2.10. TRUNCATE Syntax
12.2.11. UPDATE Syntax
12.3. MySQL Utility Statements
12.3.1. DESCRIBE Syntax
12.3.2. EXPLAIN Syntax
12.3.3. HELP Syntax
12.3.4. USE Syntax
12.4. MySQL Transactional and Locking Statements
12.4.1. START TRANSACTION, COMMIT, and ROLLBACK Syntax
12.4.2. Statements That Cannot Be Rolled Back
12.4.3. Statements That Cause an Implicit Commit
12.4.4. SAVEPOINT and ROLLBACK TO SAVEPOINT Syntax
12.4.5. LOCK TABLES and UNLOCK TABLES Syntax
12.4.6. SET TRANSACTION Syntax
12.4.7. XA Transactions
12.5. Database Administration Statements
12.5.1. Account Management Statements
12.5.2. Table Maintenance Statements
12.5.3. User-Defined Function Statements
12.5.4. SET Syntax
12.5.5. SHOW Syntax
12.5.6. Other Administrative Statements
12.6. Replication Statements
12.6.1. SQL Statements for Controlling Master Servers
12.6.2. SQL Statements for Controlling Slave Servers
12.7. SQL Syntax for Prepared Statements
12.8. MySQL Compound-Statement Syntax
12.8.1. BEGIN ... END Compound Statement Syntax
12.8.2. DECLARE Syntax
12.8.3. Variables in Stored Programs
12.8.4. Conditions and Handlers
12.8.5. Cursors
12.8.6. Flow Control Constructs
12.8.7. RETURN Syntax
13. Storage Engines
13.1. The MyISAM Storage Engine
13.1.1. MyISAM Startup Options
13.1.2. Space Needed for Keys
13.1.3. MyISAM Table Storage Formats
13.1.4. MyISAM Table Problems
13.2. The InnoDB Storage Engine
13.2.1. InnoDB Overview
13.2.2. InnoDB Contact Information
13.2.3. InnoDB Configuration
13.2.4. InnoDB Startup Options and System Variables
13.2.5. Creating and Using InnoDB Tables
13.2.6. Adding, Removing, or Resizing InnoDB Data and Log Files
13.2.7. Backing Up and Recovering an InnoDB Database
13.2.8. Moving an InnoDB Database to Another Machine
13.2.9. The InnoDB Transaction Model and Locking
13.2.10. InnoDB Performance Tuning Tips
13.2.11. InnoDB Multi-Versioning
13.2.12. InnoDB Table and Index Structures
13.2.13. InnoDB File Space Management and Disk I/O
13.2.14. InnoDB Error Handling
13.2.15. Restrictions on InnoDB Tables
13.2.16. InnoDB Troubleshooting
13.3. The MERGE Storage Engine
13.3.1. MERGE Table Problems
13.4. The MEMORY (HEAP) Storage Engine
13.5. The BDB (BerkeleyDB) Storage Engine
13.5.1. Operating Systems Supported by BDB
13.5.2. Installing BDB
13.5.3. BDB Startup Options
13.5.4. Characteristics of BDB Tables
13.5.5. Restrictions on BDB Tables
13.5.6. Errors That May Occur When Using BDB Tables
13.6. The EXAMPLE Storage Engine
13.7. The FEDERATED Storage Engine
13.7.1. Description of the FEDERATED Storage Engine
13.7.2. How to Use FEDERATED Tables
13.7.3. Limitations of the FEDERATED Storage Engine
13.8. The ARCHIVE Storage Engine
13.9. The CSV Storage Engine
13.10. The BLACKHOLE Storage Engine
14. High Availability and Scalability
14.1. Using MySQL with DRBD for High Availability
14.1.1. Configuring the DRBD Environment
14.1.2. Configuring MySQL for DRBD
14.1.3. Optimizing Performance and Reliability
14.2. Using Linux HA Heartbeat
14.2.1. Heartbeat Configuration
14.2.2. Using Heartbeat with MySQL and DRBD
14.2.3. Using Heartbeat with DRBD and dopd
14.2.4. Dealing with System Level Errors
14.3. MySQL and Virtualization
14.3.1. Common Issues with Virtualization
14.3.2. Using MySQL within an Amazon EC2 Instance
14.3.3. Virtualization Resources
14.4. Using MySQL with memcached
14.4.1. Installing memcached
14.4.2. Using memcached
14.4.3. memcached Interfaces
14.4.4. Getting memcached Statistics
14.4.5. memcached FAQ
14.5. MySQL Proxy
14.5.1. MySQL Proxy Supported Platforms
14.5.2. Installing MySQL Proxy
14.5.3. MySQL Proxy Command-Line Options
14.5.4. MySQL Proxy Scripting
14.5.5. Using MySQL Proxy
14.5.6. MySQL Proxy FAQ
15. MySQL Enterprise Monitor
15.1. An Overview of the Service
15.1.1. The Service Architecture
15.1.2. Service Features
15.1.3. Security
15.2. Conventions Used in This Document
15.3. Installation and Upgrades
15.3.1. User Roles
15.3.2. Service Manager Installation
15.3.3. MySQL Enterprise Service Manager Configuration Settings and Advisor Installation
15.3.4. Service Agent Installation
15.3.5. Starting and Stopping the MySQL Enterprise Service Agent
15.3.6. Advanced Agent Configuration
15.3.7. Unattended Installation
15.3.8. Post-Installation Considerations
15.3.9. Upgrading MySQL Enterprise Monitor
15.3.10. Reinstalling MySQL Enterprise Monitor
15.3.11. Changing Your MySQL Enterprise Monitor Installation
15.3.12. Uninstalling the MySQL Enterprise Monitor
15.4. Deploying MySQL Enterprise Service Manager
15.4.1. Backing up MySQL Enterprise Service Manager
15.4.2. Migrating 1.3.x Historical Data to MySQL Enterprise Monitor 2.0
15.5. MySQL Enterprise Dashboard
15.5.1. The Server Tree
15.5.2. The Server Graphs and Critical Events
15.5.3. The Heat Chart
15.6. The Settings Page
15.6.1. Global Settings
15.6.2. User Preferences
15.6.3. Manage Servers
15.6.4. Managing Users
15.6.5. Manage Notification Groups
15.6.6. Logs
15.6.7. The Product Information Screen
15.7. The Advisors Page
15.7.1. Installing and Updating Advisors
15.7.2. Scheduling Rules
15.7.3. Editing Built-in Rules
15.7.4. Creating Advisors and Rules
15.7.5. Disabling and Unscheduling Rules
15.7.6. Advisor Blackout Periods
15.8. The Events Page
15.8.1. Closing an Event
15.9. The Graphs Page
15.9.1. Displaying Graphs
15.9.2. Setting an Interval
15.9.3. Setting a Time Span
15.10. The Query Analyzer Page
15.10.1. Enabling Query Analyzer
15.10.2. Getting Detailed Query Information
15.10.3. Filtering Query Analyzer Data
15.10.4. Using Query Analyzer Data
15.10.5. Troubleshooting Query Analyzer
15.10.6. Query Analyzer Settings
15.11. The Replication Page
15.11.1. Replication Page Details
15.12. MySQL Enterprise Monitor Frequently Asked Questions
16. Replication
16.1. Replication Configuration
16.1.1. How to Set Up Replication
16.1.2. Replication and Binary Logging Options and Variables
16.1.3. Common Replication Administration Tasks
16.2. Replication Solutions
16.2.1. Using Replication for Backups
16.2.2. Using Replication with Different Master and Slave Storage Engines
16.2.3. Using Replication for Scale-Out
16.2.4. Replicating Different Databases to Different Slaves
16.2.5. Improving Replication Performance
16.2.6. Switching Masters During Failover
16.2.7. Setting Up Replication Using SSL
16.3. Replication Notes and Tips
16.3.1. Replication Features and Issues
16.3.2. Replication Compatibility Between MySQL Versions
16.3.3. Upgrading a Replication Setup
16.3.4. Replication FAQ
16.3.5. Troubleshooting Replication
16.3.6. How to Report Replication Bugs or Problems
16.4. Replication Implementation Overview
16.4.1. Replication Implementation Details
16.4.2. Replication Relay and Status Files
16.4.3. How Servers Evaluate Replication Rules
17. MySQL Cluster
17.1. MySQL Cluster Overview
17.1.1. MySQL Cluster Core Concepts
17.1.2. MySQL Cluster Nodes, Node Groups, Replicas, and Partitions
17.2. Simple Multi-Computer How-To
17.2.1. Hardware, Software, and Networking
17.2.2. Multi-Computer Installation
17.2.3. Multi-Computer Configuration
17.2.4. Initial Startup
17.2.5. Loading Sample Data and Performing Queries
17.2.6. Safe Shutdown and Restart
17.3. MySQL Cluster Configuration
17.3.1. Building MySQL Cluster from Source Code
17.3.2. Installing the Cluster Software
17.3.3. Quick Test Setup of MySQL Cluster
17.3.4. Configuration File
17.3.5. Overview of Cluster Configuration Parameters
17.3.6. Configuring Parameters for Local Checkpoints
17.4. MySQL Cluster Options and Variables
17.4.1. MySQL Cluster Server Option and Variable Reference
17.4.2. MySQL Cluster-Related Command Options for mysqld
17.4.3. MySQL Cluster System Variables
17.4.4. MySQL Cluster Status Variables
17.5. Upgrading and Downgrading MySQL Cluster
17.5.1. Performing a Rolling Restart of the Cluster
17.5.2. MySQL Cluster 5.0 Upgrade and Downgrade Compatibility
17.6. Process Management in MySQL Cluster
17.6.1. MySQL Server Process Usage for MySQL Cluster
17.6.2. ndbd — The Storage Engine Node Process
17.6.3. ndb_mgmd — The Management Server Process
17.6.4. ndb_mgm — The Management Client Process
17.6.5. Command Options for MySQL Cluster Processes
17.7. Management of MySQL Cluster
17.7.1. Summary of MySQL Cluster Start Phases
17.7.2. Commands in the MySQL Cluster Management Client
17.7.3. Event Reports Generated in MySQL Cluster
17.7.4. NDB Log Messages
17.7.5. Single User Mode
17.7.6. Quick Reference: MySQL Cluster SQL Statements
17.8. MySQL Cluster Security Issues
17.8.1. MySQL Cluster Security and Networking Issues
17.8.2. MySQL Cluster and MySQL Privileges
17.8.3. MySQL Cluster and MySQL Security Procedures
17.9. On-line Backup of MySQL Cluster
17.9.1. Cluster Backup Concepts
17.9.2. Using The Management Client to Create a Backup
17.9.3. ndb_restore — Restore a Cluster Backup
17.9.4. Configuration for Cluster Backup
17.9.5. Backup Troubleshooting
17.10. MySQL Cluster Utility Programs
17.10.1. ndb_config — Extract NDB Configuration Information
17.10.2. ndb_cpcd — Automate Testing for NDB Development
17.10.3. ndb_delete_all — Delete All Rows from NDB Table
17.10.4. ndb_desc — Describe NDB Tables
17.10.5. ndb_drop_index — Drop Index from NDB Table
17.10.6. ndb_drop_table — Drop NDB Table
17.10.7. ndb_error_reporter — NDB Error-Reporting Utility
17.10.8. ndb_print_backup_file — Print NDB Backup File Contents
17.10.9. ndb_print_schema_file — Print NDB Schema File Contents
17.10.10. ndb_print_sys_file — Print NDB System File Contents
17.10.11. ndb_select_all — Print Rows from NDB Table
17.10.12. ndb_select_count — Print Row Counts for NDB Tables
17.10.13. ndb_show_tables — Display List of NDB Tables
17.10.14. ndb_size.pl — NDBCLUSTER Size Requirement Estimator
17.10.15. ndb_waiter — Wait for Cluster to Reach a Given Status
17.11. Using High-Speed Interconnects with MySQL Cluster
17.11.1. Configuring MySQL Cluster to use SCI Sockets
17.11.2. MySQL Cluster Interconnects and Performance
17.12. Known Limitations of MySQL Cluster
17.12.1. Non-Compliance In SQL Syntax
17.12.2. Limits and Differences from Standard MySQL Limits
17.12.3. Limits Relating to Transaction Handling
17.12.4. Error Handling
17.12.5. Limits Associated with Database Objects
17.12.6. Unsupported Or Missing Features
17.12.7. Limitations Relating to Performance
17.12.8. Issues Exclusive to MySQL Cluster
17.12.9. Limitations Relating to Multiple Cluster Nodes
17.12.10. Previous MySQL Cluster Issues Resolved in MySQL 5.0
17.13. MySQL Cluster Development Roadmap
17.13.1. MySQL Cluster Changes in MySQL 5.0
17.13.2. MySQL 5.1 Development Roadmap for MySQL Cluster
17.14. MySQL Cluster Glossary
18. Stored Programs and Views
18.1. Defining Stored Programs
18.2. Using Stored Routines (Procedures and Functions)
18.2.1. Stored Routine Syntax
18.2.2. Stored Routines and MySQL Privileges
18.2.3. Stored Routine Metadata
18.2.4. Stored Procedures, Functions, Triggers, and LAST_INSERT_ID()
18.3. Using Triggers
18.3.1. Trigger Syntax
18.3.2. Trigger Metadata
18.4. Using Views
18.4.1. View Syntax
18.4.2. View Processing Algorithms
18.4.3. Updatable and Insertable Views
18.4.4. View Metadata
18.5. Binary Logging of Stored Programs
19. INFORMATION_SCHEMA Tables
19.1. The INFORMATION_SCHEMA SCHEMATA Table
19.2. The INFORMATION_SCHEMA TABLES Table
19.3. The INFORMATION_SCHEMA COLUMNS Table
19.4. The INFORMATION_SCHEMA STATISTICS Table
19.5. The INFORMATION_SCHEMA USER_PRIVILEGES Table
19.6. The INFORMATION_SCHEMA SCHEMA_PRIVILEGES Table
19.7. The INFORMATION_SCHEMA TABLE_PRIVILEGES Table
19.8. The INFORMATION_SCHEMA COLUMN_PRIVILEGES Table
19.9. The INFORMATION_SCHEMA CHARACTER_SETS Table
19.10. The INFORMATION_SCHEMA COLLATIONS Table
19.11. The INFORMATION_SCHEMA COLLATION_CHARACTER_SET_APPLICABILITY Table
19.12. The INFORMATION_SCHEMA TABLE_CONSTRAINTS Table
19.13. The INFORMATION_SCHEMA KEY_COLUMN_USAGE Table
19.14. The INFORMATION_SCHEMA ROUTINES Table
19.15. The INFORMATION_SCHEMA VIEWS Table
19.16. The INFORMATION_SCHEMA TRIGGERS Table
19.17. The INFORMATION_SCHEMA PROFILING Table
19.18. Other INFORMATION_SCHEMA Tables
19.19. Extensions to SHOW Statements
20. Connectors and APIs
20.1. MySQL Connector/ODBC
20.1.1. Connector/ODBC Versions
20.1.2. Connector/ODBC Introduction
20.1.3. Connector/ODBC Installation
20.1.4. Connector/ODBC Configuration
20.1.5. Connector/ODBC Examples
20.1.6. Connector/ODBC Reference
20.1.7. Connector/ODBC Notes and Tips
20.1.8. Connector/ODBC Support
20.2. MySQL Connector/NET
20.2.1. Connector/NET Versions
20.2.2. Connector/NET Installation
20.2.3. Connector/NET Examples and Usage Guide
20.2.4. Connector/NET Reference
20.2.5. Connector/NET Notes and Tips
20.2.6. Connector/NET Support
20.3. MySQL Visual Studio Plugin
20.3.1. Installing the MySQL Visual Studio Plugin
20.3.2. Creating a connection to the MySQL server
20.3.3. Using the MySQL Visual Studio Plugin
20.3.4. Visual Studio Plugin Support
20.4. MySQL Connector/J
20.4.1. Connector/J Versions
20.4.2. Connector/J Installation
20.4.3. Connector/J Examples
20.4.4. Connector/J (JDBC) Reference
20.4.5. Connector/J Notes and Tips
20.4.6. Connector/J Support
20.5. MySQL Connector/MXJ
20.5.1. Connector/MXJ Overview
20.5.2. Connector/MXJ Versions
20.5.3. Connector/MXJ Installation
20.5.4. Connector/MXJ Configuration
20.5.5. Connector/MXJ Reference
20.5.6. Connector/MXJ Notes and Tips
20.5.7. Connector/MXJ Support
20.6. MySQL Connector/C++
20.6.1. Connector/C++ Introduction
20.6.2. Connector/C++ Download
20.6.3. Connector/C++ Source repository
20.6.4. Connector/C++ Advantages
20.6.5. Connector/C++ Status
20.6.6. Connector/C++ Installation
20.6.7. Connector/C++ Getting Started: Usage Examples
20.6.8. Connector/C++ Connecting to MySQL
20.6.9. Connector/C++ Running a simple query
20.6.10. Connector/C++ Fetching results
20.6.11. Connector/C++ Using Prepared Statements
20.6.12. Connector/C++ Debug tracing
20.6.13. Connector/C++ References
20.6.14. Connector/C++ Known Bugs
20.6.15. Connector/C++ Feature requests
20.6.16. Connector/C++ Contact
20.7. libmysqld, the Embedded MySQL Server Library
20.8. MySQL C API
20.8.1. C API Data Types
20.8.2. C API Function Overview
20.8.3. C API Function Descriptions
20.8.4. C API Prepared Statements
20.8.5. C API Prepared Statement Data types
20.8.6. C API Prepared Statement Function Overview
20.8.7. C API Prepared Statement Function Descriptions
20.8.8. C API Prepared Statement Problems
20.8.9. C API Handling of Multiple Statement Execution
20.8.10. C API Handling of Date and Time Values
20.8.11. C API Threaded Function Descriptions
20.8.12. C API Embedded Server Function Descriptions
20.8.13. Controlling Automatic Reconnection Behavior
20.8.14. Common Questions and Problems When Using the C API
20.8.15. Building Client Programs
20.8.16. How to Make a Threaded Client
20.9. MySQL PHP API
20.9.1. MySQL
20.9.2. MySQL Improved Extension (Mysqli)
20.9.3. MySQL Functions (PDO_MYSQL)
20.9.4. Connector/PHP
20.9.5. Common Problems with MySQL and PHP
20.9.6. Enabling Both mysql and mysqli in PHP
20.10. MySQL Perl API
20.11. MySQL C++ API
20.12. MySQL Python API
20.13. MySQL Ruby APIs
20.13.1. The MySQL/Ruby API
20.13.2. The Ruby/MySQL API
20.14. MySQL Tcl API
20.15. MySQL Eiffel Wrapper
21. Extending MySQL
21.1. MySQL Internals
21.1.1. MySQL Threads
21.1.2. MySQL Test Suite
21.2. Adding New Functions to MySQL
21.2.1. Features of the User-Defined Function Interface
21.2.2. Adding a New User-Defined Function
21.2.3. Adding a New Native Function
21.3. Adding New Procedures to MySQL
21.3.1. PROCEDURE ANALYSE
21.3.2. Writing a Procedure
21.4. Debugging and Porting MySQL
21.4.1. Debugging a MySQL Server
21.4.2. Debugging a MySQL Client
21.4.3. The DBUG Package
21.4.4. Comments about RTS Threads
21.4.5. Differences Between Thread Packages
A. MySQL 5.0 Frequently Asked Questions
A.1. MySQL 5.0 FAQ — General
A.2. MySQL 5.0 FAQ — Storage Engines
A.3. MySQL 5.0 FAQ — Server SQL Mode
A.4. MySQL 5.0 FAQ — Stored Procedures and Functions
A.5. MySQL 5.0 FAQ — Triggers
A.6. MySQL 5.0 FAQ — Views
A.7. MySQL 5.0 FAQ — INFORMATION_SCHEMA
A.8. MySQL 5.0 FAQ — Migration
A.9. MySQL 5.0 FAQ — Security
A.10. MySQL 5.0 FAQ — MySQL Cluster
A.11. MySQL 5.0 FAQ — MySQL Chinese, Japanese, and Korean Character Sets
A.12. MySQL 5.0 FAQ — Connectors & APIs
A.13. MySQL 5.0 FAQ — Replication
A.14. MySQL 5.0 FAQ — MySQL, DRBD, and Heartbeat
A.14.1. Distributed Replicated Block Device (DRBD)
A.14.2. Linux Heartbeat
A.14.3. DRBD Architecture
A.14.4. DRBD and MySQL Replication
A.14.5. DRBD and File Systems
A.14.6. DRBD and LVM
A.14.7. DRBD and Virtualization
A.14.8. DRBD and Security
A.14.9. DRBD and System Requirements
A.14.10. DBRD and Support and Consulting
B. Errors, Error Codes, and Common Problems
B.1. Problems and Common Errors
B.1.1. How to Determine What Is Causing a Problem
B.1.2. Common Errors When Using MySQL Programs
B.1.3. Installation-Related Issues
B.1.4. Administration-Related Issues
B.1.5. Query-Related Issues
B.1.6. Optimizer-Related Issues
B.1.7. Table Definition-Related Issues
B.1.8. Known Issues in MySQL
B.2. Types of Error Values
B.3. Server Error Codes and Messages
B.4. Client Error Codes and Messages
C. MySQL Enterprise Release Notes
C.1. MySQL Enterprise 5.0 Release Notes
C.1.1. Release Notes for MySQL Enterprise 5.0.74 (Not yet released)
C.1.2. Release Notes for MySQL Enterprise 5.0.72 (24 October 2008)
C.1.3. Release Notes for MySQL Enterprise 5.0.70 (27 September 2008)
C.1.4. Release Notes for MySQL Enterprise 5.0.68 (13 August 2008)
C.1.5. Release Notes for MySQL Enterprise 5.0.66sp1 [QSP] (23 October 2008)
C.1.6. Release Notes for MySQL Enterprise 5.0.66a [MRU] (16 July 2008)
C.1.7. Release Notes for MySQL Enterprise 5.0.66 [MRU] (09 July 2008)
C.1.8. Release Notes for MySQL Enterprise 5.0.64 [MRU] (10 June 2008)
C.1.9. Release Notes for MySQL Enterprise 5.0.62 [MRU] (12 May 2008)
C.1.10. Release Notes for MySQL Enterprise 5.0.60sp1 [QSP] (27 June 2008)
C.1.11. Release Notes for MySQL Enterprise 5.0.60 [MRU] (28 April 2008)
C.1.12. Release Notes for MySQL Enterprise 5.0.58 [MRU] (05 March 2008)
C.1.13. Release Notes for MySQL Enterprise 5.0.56sp1 [QSP] (30 March 2008)
C.1.14. Release Notes for MySQL Enterprise 5.0.56 [MRU] (06 February 2008)
C.1.15. Release Notes for MySQL Enterprise 5.0.54a [MRU] (11 January 2008)
C.1.16. Release Notes for MySQL Enterprise 5.0.54 [MRU] (14 December 2007)
C.1.17. Release Notes for MySQL Enterprise 5.0.52 [MRU] (30 November 2007)
C.1.18. Release Notes for MySQL Enterprise 5.0.50sp1a [QSP] (11 January 2008)
C.1.19. Release Notes for MySQL Enterprise 5.0.50sp1 [QSP] (12 December 2007)
C.1.20. Release Notes for MySQL Enterprise 5.0.50 [MRU] (19 October 2007)
C.1.21. Release Notes for MySQL Enterprise 5.0.48 [MRU] (27 August 2007)
C.1.22. Release Notes for MySQL Enterprise 5.0.46 [MRU] (13 July 2007)
C.1.23. Release Notes for MySQL Enterprise 5.0.44sp1 [QSP] (01 August 2007)
C.1.24. Release Notes for MySQL Enterprise 5.0.44 [MRU] (21 June 2007)
C.1.25. Release Notes for MySQL Enterprise 5.0.42 [MRU] (23 May 2007)
C.1.26. Release Notes for MySQL Enterprise 5.0.40 [MRU] (17 April 2007)
C.1.27. Release Notes for MySQL Enterprise 5.0.38 [MRU] (20 March 2007)
C.1.28. Release Notes for MySQL Enterprise 5.0.36sp1 [QSP] (12 April 2007)
C.1.29. Release Notes for MySQL Enterprise 5.0.36 [MRU] (20 February 2007)
C.1.30. Release Notes for MySQL Enterprise 5.0.34 [MRU] (17 January 2007)
C.1.31. Release Notes for MySQL Enterprise 5.0.32 [MRU] (20 December 2006)
C.1.32. Release Notes for MySQL Enterprise 5.0.30sp1 [QSP] (19 January 2007)
C.1.33. Release Notes for MySQL Enterprise 5.0.30 [MRU] (14 November 2006)
C.1.34. Release Notes for MySQL Enterprise 5.0.28 (24 October 2006)
D. MySQL Community Server Enhancements and Release Notes
D.1. MySQL Community Server 5.0 Enhancements and Release Notes
D.1.1. Release Notes for MySQL Community Server 5.0.67 (04 August 2008)
D.1.2. Release Notes for MySQL Community Server 5.0.51b (24 April 2008)
D.1.3. Release Notes for MySQL Community Server 5.0.51a (11 January 2008)
D.1.4. Release Notes for MySQL Community Server 5.0.51 (15 November 2007)
D.1.5. Release Notes for MySQL Community Server 5.0.45 (04 July 2007)
D.1.6. Release Notes for MySQL Community Server 5.0.41 (01 May 2007)
D.1.7. Release Notes for MySQL Community Server 5.0.37 (27 February 2007)
D.1.8. Release Notes for MySQL Community Server 5.0.33 (09 January 2007)
D.1.9. Release Notes for MySQL Community Server 5.0.27 (21 October 2006)
E. MySQL Change History
E.1. Changes in release 5.0.x (Production)
E.1.1. Changes for release 5.0.27 and up
E.1.2. Changes in MySQL 5.0.26 (03 October 2006)
E.1.3. Changes in MySQL 5.0.25 (15 September 2006)
E.1.4. Changes in MySQL 5.0.24a (25 August 2006)
E.1.5. Changes in MySQL 5.0.24 (27 July 2006)
E.1.6. Changes in MySQL 5.0.23 (Not released)
E.1.7. Changes in MySQL 5.0.22 (24 May 2006)
E.1.8. Changes in MySQL 5.0.21 (02 May 2006)
E.1.9. Changes in MySQL 5.0.20a (18 April 2006)
E.1.10. Changes in MySQL 5.0.20 (31 March 2006)
E.1.11. Changes in MySQL 5.0.19 (04 March 2006)
E.1.12. Changes in MySQL 5.0.18 (21 December 2005)
E.1.13. Changes in MySQL 5.0.17 (14 December 2005)
E.1.14. Changes in MySQL 5.0.16 (10 November 2005)
E.1.15. Changes in MySQL 5.0.15 (19 October 2005: Production)
E.1.16. Changes in MySQL 5.0.14 (Not released)
E.1.17. Changes in MySQL 5.0.13 (22 September 2005: Release Candidate)
E.1.18. Changes in MySQL 5.0.12 (02 September 2005)
E.1.19. Changes in MySQL 5.0.11 (06 August 2005)
E.1.20. Changes in MySQL 5.0.10 (27 July 2005)
E.1.21. Changes in MySQL 5.0.9 (15 July 2005)
E.1.22. Changes in MySQL 5.0.8 (Not released)
E.1.23. Changes in MySQL 5.0.7 (10 June 2005)
E.1.24. Changes in MySQL 5.0.6 (26 May 2005)
E.1.25. Changes in MySQL 5.0.5 (Not released)
E.1.26. Changes in MySQL 5.0.4 (16 April 2005)
E.1.27. Changes in MySQL 5.0.3 (23 March 2005: Beta)
E.1.28. Changes in MySQL 5.0.2 (01 December 2004)
E.1.29. Changes in MySQL 5.0.1 (27 July 2004)
E.1.30. Changes in MySQL 5.0.0 (22 December 2003: Alpha)
E.2. Changes in MySQL Cluster
E.2.1. Changes in MySQL Cluster-5.0.7 (10 June 2005)
E.2.2. Changes in MySQL Cluster-5.0.6 (26 May 2005)
E.2.3. Changes in MySQL Cluster-5.0.5 (Not released)
E.2.4. Changes in MySQL Cluster-5.0.4 (16 April 2005)
E.2.5. Changes in MySQL Cluster-5.0.3 (23 March 2005: Beta)
E.2.6. Changes in MySQL Cluster-5.0.1 (27 July 2004)
E.2.7. Changes in MySQL Cluster-4.1.13 (15 July 2005)
E.2.8. Changes in MySQL Cluster-4.1.12 (13 May 2005)
E.2.9. Changes in MySQL Cluster-4.1.11 (01 April 2005)
E.2.10. Changes in MySQL Cluster-4.1.10 (12 February 2005)
E.2.11. Changes in MySQL Cluster-4.1.9 (13 January 2005)
E.2.12. Changes in MySQL Cluster-4.1.8 (14 December 2004)
E.2.13. Changes in MySQL Cluster-4.1.7 (23 October 2004)
E.2.14. Changes in MySQL Cluster-4.1.6 (10 October 2004)
E.2.15. Changes in MySQL Cluster-4.1.5 (16 September 2004)
E.2.16. Changes in MySQL Cluster-4.1.4 (31 August 2004)
E.2.17. Changes in MySQL Cluster-4.1.3 (28 June 2004)
E.3. MySQL Enterprise Monitor Change History
E.3.1. Changes in MySQL Enterprise Monitor 2.0 (Not Yet Released)
E.4. MySQL Connector/ODBC (MyODBC) Change History
E.4.1. Changes in MySQL Connector/ODBC 5.1.6 (Not yet released)
E.4.2. Changes in MySQL Connector/ODBC 5.1.5 (18 August 2008)
E.4.3. Changes in MySQL Connector/ODBC 5.1.4 (15 April 2008)
E.4.4. Changes in MySQL Connector/ODBC 5.1.3 (26 March 2008)
E.4.5. Changes in MySQL Connector/ODBC 5.1.2 (13 February 2008)
E.4.6. Changes in MySQL Connector/ODBC 5.1.1 (13 December 2007)
E.4.7. Changes in MySQL Connector/ODBC 5.1.0 (10 September 2007)
E.4.8. Changes in MySQL Connector/ODBC 5.0.12 (Never released)
E.4.9. Changes in MySQL Connector/ODBC 5.0.11 (31 January 2007)
E.4.10. Changes in MySQL Connector/ODBC 5.0.10 (14 December 2006)
E.4.11. Changes in MySQL Connector/ODBC 5.0.9 (22 November 2006)
E.4.12. Changes in MySQL Connector/ODBC 5.0.8 (17 November 2006)
E.4.13. Changes in MySQL Connector/ODBC 5.0.7 (08 November 2006)
E.4.14. Changes in MySQL Connector/ODBC 5.0.6 (03 November 2006)
E.4.15. Changes in MySQL Connector/ODBC 5.0.5 (17 October 2006)
E.4.16. Changes in Connector/ODBC 5.0.3 (Connector/ODBC 5.0 Alpha 3) (20 June 2006)
E.4.17. Changes in Connector/ODBC 5.0.2 (Never released)
E.4.18. Changes in Connector/ODBC 5.0.1 (Connector/ODBC 5.0 Alpha 2) (05 June 2006)
E.4.19. Changes in MySQL Connector/ODBC 3.51.27 (20 November 2008)
E.4.20. Changes in MySQL Connector/ODBC 3.51.26 (07 July 2008)
E.4.21. Changes in MySQL Connector/ODBC 3.51.25 (11 April 2008)
E.4.22. Changes in MySQL Connector/ODBC 3.51.24 (14 March 2008)
E.4.23. Changes in MySQL Connector/ODBC 3.51.23 (09 January 2008)
E.4.24. Changes in MySQL Connector/ODBC 3.51.22 (13 November 2007)
E.4.25. Changes in MySQL Connector/ODBC 3.51.21 (08 October 2007)
E.4.26. Changes in MySQL Connector/ODBC 3.51.20 (10 September 2007)
E.4.27. Changes in MySQL Connector/ODBC 3.51.19 (10 August 2007)
E.4.28. Changes in MySQL Connector/ODBC 3.51.18 (08 August 2007)
E.4.29. Changes in MySQL Connector/ODBC 3.51.17 (14 July 2007)
E.4.30. Changes in MySQL Connector/ODBC 3.51.16 (14 June 2007)
E.4.31. Changes in MySQL Connector/ODBC 3.51.15 (07 May 2007)
E.4.32. Changes in MySQL Connector/ODBC 3.51.14 (08 March 2007)
E.4.33. Changes in MySQL Connector/ODBC 3.51.13 (Never released)
E.4.34. Changes in MySQL Connector/ODBC 3.51.12 (11 February 2005)
E.4.35. Changes in MySQL Connector/ODBC 3.51.11 (28 January 2005)
E.5. MySQL Connector/NET Change History
E.5.1. Changes in MySQL Connector/NET 5.3.0 (Not yet released)
E.5.2. Changes in MySQL Connector/NET 5.2.6 (Not yet released)
E.5.3. Changes in MySQL Connector/NET 5.2.5 (19 November 2008)
E.5.4. Changes in MySQL Connector/NET 5.2.4 (13 November 2008)
E.5.5. Changes in MySQL Connector/NET 5.2.3 (19 August 2008)
E.5.6. Changes in MySQL Connector/NET 5.2.2 (12 May 2008)
E.5.7. Changes in MySQL Connector/NET 5.2.1 (27 February 2008)
E.5.8. Changes in MySQL Connector/NET 5.2.0 (11 February 2008)
E.5.9. Changes in MySQL Connector/NET 5.1.8 (Not yet released)
E.5.10. Changes in MySQL Connector/NET 5.1.7 (21 August 2008)
E.5.11. Changes in MySQL Connector/NET 5.1.6 (12 May 2008)
E.5.12. Changes in MySQL Connector/NET 5.1.5 (Not yet released)
E.5.13. Changes in MySQL Connector/NET 5.1.4 (20 November 2007)
E.5.14. Changes in MySQL Connector/NET 5.1.3 (21 September 2007: beta)
E.5.15. Changes in MySQL Connector/NET 5.1.2 (18 June 2007)
E.5.16. Changes in MySQL Connector/NET 5.1.1 (23 May 2007)
E.5.17. Changes in MySQL Connector/NET 5.1.0 (01 May 2007)
E.5.18. Changes in MySQL Connector/NET 5.0.10 (Not yet released)
E.5.19. Changes in MySQL Connector/NET 5.0.9 (Not yet released)
E.5.20. Changes in MySQL Connector/NET 5.0.8 (21 August 2007)
E.5.21. Changes in MySQL Connector/NET 5.0.7 (18 May 2007)
E.5.22. Changes in MySQL Connector/NET 5.0.6 (22 March 2007)
E.5.23. Changes in MySQL Connector/NET 5.0.5 (07 March 2007)
E.5.24. Changes in MySQL Connector/NET 5.0.4 (Not released)
E.5.25. Changes in MySQL Connector/NET 5.0.3 (05 January 2007)
E.5.26. Changes in MySQL Connector/NET 5.0.2 (06 November 2006)
E.5.27. Changes in MySQL Connector/NET 5.0.1 (01 October 2006)
E.5.28. Changes in MySQL Connector/NET 5.0.0 (08 August 2006)
E.5.29. Changes in MySQL Connector/NET 1.0.11 (Not yet released)
E.5.30. Changes in MySQL Connector/NET 1.0.10 (24 August 2007)
E.5.31. Changes in MySQL Connector/NET 1.0.9 (02 February 2007)
E.5.32. Changes in MySQL Connector/NET 1.0.8 (20 October 2006)
E.5.33. Changes in MySQL Connector/NET 1.0.7 (21 November 2005)
E.5.34. Changes in MySQL Connector/NET 1.0.6 (03 October 2005)
E.5.35. Changes in MySQL Connector/NET 1.0.5 (29 August 2005)
E.5.36. Changes in MySQL Connector/NET 1.0.4 (20 January 2005)
E.5.37. Changes in MySQL Connector/NET 1.0.3 (12 October 2004: gamma)
E.5.38. Changes in MySQL Connector/NET 1.0.2 (15 November 2004: gamma)
E.5.39. Changes in MySQL Connector/NET 1.0.1 (27 October 2004: beta)
E.5.40. Changes in MySQL Connector/NET 1.0.0 (01 September 2004)
E.5.41. Changes in MySQL Connector/NET Version 0.9.0 (30 August 2004)
E.5.42. Changes in MySQL Connector/NET Version 0.76
E.5.43. Changes in MySQL Connector/NET Version 0.75
E.5.44. Changes in MySQL Connector/NET Version 0.74
E.5.45. Changes in MySQL Connector/NET Version 0.71
E.5.46. Changes in MySQL Connector/NET Version 0.70
E.5.47. Changes in MySQL Connector/NET Version 0.68
E.5.48. Changes in MySQL Connector/NET Version 0.65
E.5.49. Changes in MySQL Connector/NET Version 0.60
E.5.50. Changes in MySQL Connector/NET Version 0.50
E.6. MySQL Visual Studio Plugin Change History
E.6.1. Changes in MySQL Visual Studio Plugin 1.0.3 (Not yet released)
E.6.2. Changes in MySQL Visual Studio Plugin 1.0.2 (Not yet released)
E.6.3. Changes in MySQL Visual Studio Plugin 1.0.1 (4 October 2006)
E.6.4. Changes in MySQL Visual Studio Plugin 1.0.0 (4 October 2006)
E.7. MySQL Connector/J Change History
E.7.1. Changes in MySQL Connector/J 5.1.x
E.7.2. Changes in MySQL Connector/J 5.0.x
E.7.3. Changes in MySQL Connector/J 3.1.x
E.7.4. Changes in MySQL Connector/J 3.0.x
E.7.5. Changes in MySQL Connector/J 2.0.x
E.7.6. Changes in MySQL Connector/J 1.2b (04 July 1999)
E.7.7. Changes in MySQL Connector/J 1.2.x and lower
E.8. MySQL Connector/MXJ Change History
E.8.1. Changes in MySQL Connector/MXJ 5.0.6 (04 May 2007)
E.8.2. Changes in MySQL Connector/MXJ 5.0.5 (14 March 2007)
E.8.3. Changes in MySQL Connector/MXJ 5.0.4 (28 January 2007)
E.8.4. Changes in MySQL Connector/MXJ 5.0.3 (24 June 2006)
E.8.5. Changes in MySQL Connector/MXJ 5.0.2 (15 June 2006)
E.8.6. Changes in MySQL Connector/MXJ 5.0.1 (Never released)
E.8.7. Changes in MySQL Connector/MXJ 5.0.0 (09 December 2005)
E.9. MySQL Proxy Change History
E.9.1. Changes in MySQL Proxy 0.6.0 (Not yet released)
E.9.2. Changes in MySQL Proxy 0.5.1 (30 June 2007)
E.9.3. Changes in MySQL Proxy 0.5.0 (19 June 2007)
F. Restrictions and Limits
F.1. Restrictions on Stored Routines and Triggers
F.2. Restrictions on Server-Side Cursors
F.3. Restrictions on Subqueries
F.4. Restrictions on Views
F.5. Restrictions on XA Transactions
F.6. Restrictions on Character Sets
F.7. Limits in MySQL
F.7.1. Limits of Joins
F.7.2. The Maximum Number of Columns Per Table
F.7.3. Windows Platform Limitations
Index

List of Figures

14.1. DRBD Architecture Overview
14.2. DRBD Architecture Using Separate Network Interfaces
14.3. Heartbeat Architecture
14.4. memcached Architecture Overview
14.5. Memory Allocation in memcached
14.6. Typical memcached Application Flowchart
15.1. MySQL Enterprise Monitor Architecture
15.2. Installing MySQL Monitor on Windows: Language Selection
15.3. Installing MySQL Monitor on Windows: Installation Directory
15.4. Installing MySQL Monitor on Windows: Tomcat Server Options
15.5. Installing MySQL Monitor on Windows: Repository Configuration
15.6. Installing MySQL Monitor on OS X: Language Selection
15.7. Installing MySQL Monitor on OS X: Java Selection
15.8. Installing MySQL Monitor on OS X: Installation Directory
15.9. Installing MySQL Monitor on OS X: Tomcat Server Options
15.10. Installing MySQL Monitor on OS X: Repository Configuration
15.11. Initial dashboard log-in
15.12. Outgoing email settings
15.13. Installing MySQL Enterprise Service Agent on Windows: Language Selection
15.14. Installing MySQL Enterprise Service Agent on Windows: Installation Directory
15.15. Installing MySQL Enterprise Service Agent on Windows: Monitored Database Information
15.16. Installing MySQL Enterprise Service Agent on Windows: Query Analyzer Configuration
15.17. Installing MySQL Enterprise Service Agent on Windows: MySQL Enterprise Service Manager Options
15.18. Installing MySQL Enterprise Service Agent on Mac OS X: Language Selection
15.19. Installing MySQL Enterprise Service Agent on Mac OS X: Installation Directory
15.20. Installing MySQL Enterprise Service Agent on Mac OS X: Monitored Database Information
15.21. Installing MySQL Enterprise Service Agent on Mac OS X: Monitored Database Information
15.22. Installing MySQL Enterprise Service Agent on Mac OS X: Query Analyzer Configuration
15.23. Installing MySQL Enterprise Service Agent on Mac OS X: MySQL Enterprise Service Manager Options
15.24. MySQL Enterprise Service Manager Update Installation: Language
15.25. MySQL Enterprise Service Manager Update Installation: Previous Installation
15.26. MySQL Enterprise Service Manager Update Installation: Backup of Previous Installation
15.27. MySQL Enterprise Service Manager Update Installation: Completed installing files
15.28. MySQL Enterprise Service Manager Update Installation: Final Setup
15.29. Historical Data Migration Availability
15.30. Confirming Historical Data Migration
15.31. Historical Data Migration Progress
15.32. The Graphs screen
15.33. The Heat Chart
15.34. The Heat Chart legend
15.35. MySQL Enterprise Dashboard: Settings
15.36. MySQL Enterprise Dashboard: User Preferences
15.37. MySQL Enterprise Dashboard: Manage Servers
15.38. Server renaming
15.39. MySQL Enterprise Dashboard: Manage Users
15.40. MySQL Enterprise Dashboard: Manage Notification Groups
15.41. MySQL Enterprise Dashboard: Logs
15.42. Schedule dialog
15.43. Edit rule screen
15.44. Events screen
15.45. Query Analyzer in MySQL Monitor
15.46. Standard agent/monitor topology
15.47. Query Analyzer agent/monitor topology
15.48. Canonical Query Tab for a Query
15.49. Example Query Tab for a Query
15.50. Explain Query Tab for a Query
15.51. Query Analyzer Configuration
15.52. Replication groups
16.1. Using replication to improve the performance during scaleout
16.2. Using replication to replicate separate DBs to multiple hosts
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
A.1. Active-Master MySQL server

List of Tables

1. Topic Quick Reference
2.1. Build (configure) Reference
4.1. mysqld_safe Option Reference
4.2. mysql Option Reference
4.3. mysqladmin Option Reference
4.4. mysqlcheck Option Reference
4.5. mysqldump Option Reference
4.6. mysqlimport Option Reference
4.7. mysqlshow Option Reference
4.8. myisamchk Option Reference
4.9. mysqlaccess Option Reference
4.10. mysqlbinlog Option Reference
4.11. mysqlhotcopy Option Reference
4.12. mysql_tableinfo Option Reference
5.1. mysqld Option/Variable Summary
5.2. mysqld System Variable Summary
5.3. mysqld Session System Variable Summary
5.4. mysqld Security Option/Variable Summary
5.5. mysqld SSL Option/Variable Summary
13.1. mysqld Option/Variable Reference
13.2. mysqld Option/Variable Reference
13.3. mysqld Option/Variable Reference
15.1. Wiki formatting
16.1. mysqld Replication Option/Variable Summary
16.2. mysqld Binary Logging Option/Variable Summary
17.1. mysqld Option/Variable Reference
20.1. MySQL APIs and Interfaces
20.2. Mapping of MySQL Error Numbers to SQLStates
20.3. MySQL Configuration Options
20.4. MySQL client constants
20.5. MySQL fetch constants
20.6. MySQLi Configuration Options
20.7. Possible mysqli_info return values
20.8. Valid options
20.9. Supported flags
20.10. Attribute values
20.11. Type specification chars
20.12. Return Values
20.13. Object attributes
20.14. Object properties
20.15. Object properties
20.16. Supported flags

List of Examples

20.1. Obtaining a connection from the DriverManager
20.2. Using java.sql.Statement to execute a SELECT query
20.3. Stored Procedures
20.4. Using Connection.prepareCall()
20.5. Registering output parameters
20.6. Setting CallableStatement input parameters
20.7. Retrieving results and output parameter values
20.8. Retrieving AUTO_INCREMENT column values using Statement.getGeneratedKeys()
20.9. Retrieving AUTO_INCREMENT column values using SELECT LAST_INSERT_ID()
20.10. Retrieving AUTO_INCREMENT column values in Updatable ResultSets
20.11. Using a connection pool with a J2EE application server
20.12. Example of transaction with retry logic
20.13. MySQL extension overview example
20.14. mysql_affected_rows example
20.15. mysql_affected_rows example using transactions
20.16. mysql_client_encoding example
20.17. mysql_close example
20.18. mysql_connect example
20.19. mysql_connect example using hostname:port syntax
20.20. mysql_connect example using ":/path/to/socket" syntax
20.21. mysql_create_db alternative example
20.22. mysql_data_seek example
20.23. mysql_db_name example
20.24. mysql_db_query alternative example
20.25. mysql_drop_db alternative example
20.26. mysql_errno example
20.27. mysql_error example
20.28. mysql_escape_string example
20.29. Query with aliased duplicate field names
20.30. mysql_fetch_array with MYSQL_NUM
20.31. mysql_fetch_array with MYSQL_ASSOC
20.32. mysql_fetch_array with MYSQL_BOTH
20.33. An expanded mysql_fetch_assoc example
20.34. mysql_fetch_field example
20.35. A mysql_fetch_lengths example
20.36. mysql_fetch_object example
20.37. mysql_fetch_object example
20.38. Fetching one row with mysql_fetch_row
20.39. A mysql_field_flags example
20.40. mysql_field_len example
20.41. mysql_field_name example
20.42. A mysql_field_table example
20.43. mysql_field_type example
20.44. A mysql_free_result example
20.45. mysql_get_client_info example
20.46. mysql_get_host_info example
20.47. mysql_get_proto_info example
20.48. mysql_get_server_info example
20.49. Relevant MySQL Statements
20.50. mysql_insert_id example
20.51. mysql_list_dbs example
20.52. Alternate to deprecated mysql_list_fields
20.53. mysql_list_processes example
20.54. mysql_list_tables alternative example
20.55. A mysql_num_fields example
20.56. mysql_num_rows example
20.57. A mysql_ping example
20.58. Invalid Query
20.59. Valid Query
20.60. Simple mysql_real_escape_string example
20.61. An example SQL Injection Attack
20.62. A "Best Practice" query
20.63. mysql_result example
20.64. mysql_select_db example
20.65. mysql_stat example
20.66. Alternative mysql_stat example
20.67. mysql_tablename example
20.68. mysql_thread_id example
20.69. Object oriented style
20.70. Procedural style
20.71. Object oriented style
20.72. Procedural style
20.73. Object oriented style
20.74. Procedural style
20.75. Object oriented style
20.76. Procedural style
20.77. Object oriented style
20.78. Procedural style
20.79. mysqli_connect_errno example
20.80. mysqli_connect_error example
20.81. Object oriented style
20.82. Procedural style
20.83. Generating a Trace File
20.84. Object oriented style
20.85. Procedural style
20.86. Object oriented style
20.87. Procedural style
20.88. Object oriented style
20.89. Procedural style
20.90. Object oriented style
20.91. Procedural style
20.92. mysqli_get_client_info
20.93. mysqli_get_client_version
20.94. Object oriented style
20.95. Procedural style
20.96. Object oriented style
20.97. Procedural style
20.98. Object oriented style
20.99. Procedural style
20.100. Object oriented style
20.101. Procedural style
20.102. Object oriented style
20.103. Procedural style
20.104. Object oriented style
20.105. Procedural style
20.106. Object oriented style
20.107. Procedural style
20.108. Object oriented style
20.109. Procedural style
20.110. Object oriented style
20.111. Procedural style
20.112. Object oriented style
20.113. Procedural style
20.114. Object oriented style
20.115. Procedural style
20.116. Object oriented style
20.117. Procedural style
20.118. Object oriented style
20.119. Procedural style
20.120. Object oriented style
20.121. Procedural style
20.122. Object oriented style
20.123. Procedural style
20.124. Object oriented style
20.125. Procedural style
20.126. Object oriented style
20.127. Procedural style
20.128. Object oriented style
20.129. Procedural style
20.130. Object oriented style
20.131. Procedural style
20.132. Object oriented style
20.133. Procedural style
20.134. Object oriented style
20.135. Procedural style
20.136. Object oriented style
20.137. Procedural style
20.138. Object oriented style
20.139. Procedural style
20.140. Object oriented style
20.141. Procedural style
20.142. Object oriented style
20.143. Procedural style
20.144. Object oriented style
20.145. Procedural style
20.146. Object oriented style
20.147. Procedural style
20.148. Object oriented style
20.149. Procedural style
20.150. Object oriented style
20.151. Procedural style
20.152. Object oriented style
20.153. Procedural style
20.154. Object oriented style
20.155. Procedural style
20.156. Object oriented style
20.157. Procedural style
20.158. Object oriented style
20.159. Procedural style
20.160. Object oriented style
20.161. Procedural style
20.162. Object oriented style
20.163. Object oriented style
20.164. Procedural style
20.165. Object oriented style
20.166. Procedural style
20.167. Object oriented style
20.168. Procedural style
20.169. Object oriented style
20.170. Procedural style
20.171. Object oriented style
20.172. Procedural style
20.173. Object oriented style
20.174. Procedural style
20.175. Object oriented style
20.176. Procedural style
20.177. Object oriented style
20.178. Procedural style
20.179. Object oriented style
20.180. Procedural style
20.181. Object oriented style
20.182. Procedural style
20.183. Object oriented style
20.184. Procedural style
20.185. Object oriented style
20.186. Procedural style
20.187. Object oriented style
20.188. Procedural style
20.189. Object oriented style
20.190. Procedural style
20.191. Object oriented style
20.192. Procedural style
20.193. Object oriented style
20.194. Forcing queries to be buffered in mysql
20.195. PDO_MYSQL DSN examples