MySQL Reference Manual for version 4.1.7.


Table of Contents

1. General Information
1.1. About This Manual
1.1.1.1.1. Conventions Used in This Manual
1.2. Overview of the MySQL Database Management System
1.2.1.2.1. History of MySQL
1.2.1.2.2. The Main Features of MySQL
1.2.1.2.3. MySQL Stability
1.2.1.2.4. How Big MySQL Tables Can Be
1.2.1.2.5. Year 2000 Compliance
1.3. Overview of MySQL AB
1.3.1.3.1. The Business Model and Services of MySQL AB
1.3.1.3.2. Contact Information
1.4. MySQL Support and Licensing
1.4.1.4.1. Support Offered by MySQL AB
1.4.1.4.2. Copyrights and Licenses Used by MySQL
1.4.1.4.3. MySQL Licenses
1.4.1.4.4. MySQL AB Logos and Trademarks
1.5. MySQL Development Roadmap
1.5.1.5.1. MySQL 4.0 in a Nutshell
1.5.1.5.2. MySQL 4.1 in a Nutshell
1.5.1.5.3. MySQL 5.0: The Next Development Release
1.6. MySQL and the Future (the TODO)
1.6.1.6.1. New Features Planned for 5.0
1.6.1.6.2. New Features Planned for 5.1
1.6.1.6.3. New Features Planned for the Near Future
1.6.1.6.4. New Features Planned for the Mid-Term Future
1.6.1.6.5. New Features We Don't Plan to Implement
1.7. MySQL Information Sources
1.7.1.7.1. MySQL Mailing Lists
1.7.1.7.2. MySQL Community Support on IRC (Internet Relay Chat)
1.8. MySQL Standards Compliance
1.8.1.8.1. What Standards MySQL Follows
1.8.1.8.2. Selecting SQL Modes
1.8.1.8.3. Running MySQL in ANSI Mode
1.8.1.8.4. MySQL Extensions to Standard SQL
1.8.1.8.5. MySQL Differences from Standard SQL
1.8.1.8.6. How MySQL Deals with Constraints
1.8.1.8.7. Known Errors and Design Deficiencies in MySQL
2. Installing MySQL
2.1. General Installation Issues
2.1.2.1.1. Operating Systems Supported by MySQL
2.1.2.1.2. Choosing Which MySQL Distribution to Install
2.1.2.1.3. How to Get MySQL
2.1.2.1.4. Verifying Package Integrity Using MD5 Checksums or GnuPG
2.1.2.1.5. Installation Layouts
2.2. Standard MySQL Installation Using a Binary Distribution
2.2.2.2.1. Installing MySQL on Windows
2.2.2.2.2. Installing MySQL on Linux
2.2.2.2.3. Installing MySQL on Mac OS X
2.2.2.2.4. Installing MySQL on NetWare
2.2.2.2.5. Installing MySQL on Other Unix-Like Systems
2.3. MySQL Installation Using a Source Distribution
2.3.2.3.1. Source Installation Overview
2.3.2.3.2. Typical configure Options
2.3.2.3.3. Installing from the Development Source Tree
2.3.2.3.4. Dealing with Problems Compiling MySQL
2.3.2.3.5. MIT-pthreads Notes
2.3.2.3.6. Installing MySQL from Source on Windows
2.3.2.3.7. Compiling MySQL Clients on Windows
2.4. Post-Installation Setup and Testing
2.4.2.4.1. Windows Post-Installation Procedures
2.4.2.4.2. Unix Post-Installation Procedures
2.4.2.4.3. Securing the Initial MySQL Accounts
2.5. Upgrading/Downgrading MySQL
2.5.2.5.1. Upgrading from Version 4.1 to 5.0
2.5.2.5.2. Upgrading from Version 4.0 to 4.1
2.5.2.5.3. Upgrading from Version 3.23 to 4.0
2.5.2.5.4. Upgrading from Version 3.22 to 3.23
2.5.2.5.5. Upgrading from Version 3.21 to 3.22
2.5.2.5.6. Upgrading from Version 3.20 to 3.21
2.5.2.5.7. Upgrading MySQL Under Windows
2.5.2.5.8. Upgrading the Grant Tables
2.5.2.5.9. Copying MySQL Databases to Another Machine
2.6. Operating System-Specific Notes
2.6.2.6.1. Linux Notes
2.6.2.6.2. Mac OS X Notes
2.6.2.6.3. Solaris Notes
2.6.2.6.4. BSD Notes
2.6.2.6.5. Other Unix Notes
2.6.2.6.6. OS/2 Notes
2.6.2.6.7. BeOS Notes
2.7. Perl Installation Notes
2.7.2.7.1. Installing Perl on Unix
2.7.2.7.2. Installing ActiveState Perl on Windows
2.7.2.7.3. Problems Using the Perl DBI/DBD Interface
3. MySQL Tutorial
3.1. Connecting to and Disconnecting from the Server
3.2. Entering Queries
3.3. Creating and Using a Database
3.3.3.3.1. Creating and Selecting a Database
3.3.3.3.2. Creating a Table
3.3.3.3.3. Loading Data into a Table
3.3.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.3.6.1. The Maximum Value for a Column
3.6.3.6.2. The Row Holding the Maximum of a Certain Column
3.6.3.6.3. Maximum of Column per Group
3.6.3.6.4. The Rows Holding the Group-wise Maximum of a Certain Field
3.6.3.6.5. Using User Variables
3.6.3.6.6. Using Foreign Keys
3.6.3.6.7. Searching on Two Keys
3.6.3.6.8. Calculating Visits Per Day
3.6.3.6.9. Using AUTO_INCREMENT
3.7. Queries from the Twin Project
3.7.3.7.1. Find All Non-distributed Twins
3.7.3.7.2. Show a Table of Twin Pair Status
3.8. Using MySQL with Apache
4. Using MySQL Programs
4.1. Overview of MySQL Programs
4.2. Invoking MySQL Programs
4.3. Specifying Program Options
4.3.4.3.1. Using Options on the Command Line
4.3.4.3.2. Using Option Files
4.3.4.3.3. Using Environment Variables to Specify Options
4.3.4.3.4. Using Options to Set Program Variables
5. Database Administration
5.1. The MySQL Server and Server Startup Scripts
5.1.5.1.1. Overview of the Server-Side Scripts and Utilities
5.1.5.1.2. The mysqld-max Extended MySQL Server
5.1.5.1.3. The mysqld_safe Server Startup Script
5.1.5.1.4. The mysql.server Server Startup Script
5.1.5.1.5. The mysqld_multi Program for Managing Multiple MySQL Servers
5.2. Configuring the MySQL Server
5.2.5.2.1. mysqld Command-Line Options
5.2.5.2.2. The Server SQL Mode
5.2.5.2.3. Server System Variables
5.2.5.2.4. Server Status Variables
5.3. The MySQL Server Shutdown Process
5.4. General Security Issues
5.4.5.4.1. General Security Guidelines
5.4.5.4.2. Making MySQL Secure Against Attackers
5.4.5.4.3. Startup Options for mysqld Concerning Security
5.4.5.4.4. Security Issues with LOAD DATA LOCAL
5.5. The MySQL Access Privilege System
5.5.5.5.1. What the Privilege System Does
5.5.5.5.2. How the Privilege System Works
5.5.5.5.3. Privileges Provided by MySQL
5.5.5.5.4. Connecting to the MySQL Server
5.5.5.5.5. Access Control, Stage 1: Connection Verification
5.5.5.5.6. Access Control, Stage 2: Request Verification
5.5.5.5.7. When Privilege Changes Take Effect
5.5.5.5.8. Causes of Access denied Errors
5.5.5.5.9. Password Hashing in MySQL 4.1
5.6. MySQL User Account Management
5.6.5.6.1. MySQL Usernames and Passwords
5.6.5.6.2. Adding New User Accounts to MySQL
5.6.5.6.3. Removing User Accounts from MySQL
5.6.5.6.4. Limiting Account Resources
5.6.5.6.5. Assigning Account Passwords
5.6.5.6.6. Keeping Your Password Secure
5.6.5.6.7. Using Secure Connections
5.7. Disaster Prevention and Recovery
5.7.5.7.1. Database Backups
5.7.5.7.2. Table Maintenance and Crash Recovery
5.7.5.7.3. Setting Up a Table Maintenance Schedule
5.7.5.7.4. Getting Information About a Table
5.8. MySQL Localization and International Usage
5.8.5.8.1. The Character Set Used for Data and Sorting
5.8.5.8.2. Setting the Error Message Language
5.8.5.8.3. Adding a New Character Set
5.8.5.8.4. The Character Definition Arrays
5.8.5.8.5. String Collating Support
5.8.5.8.6. Multi-Byte Character Support
5.8.5.8.7. Problems With Character Sets
5.8.5.8.8. MySQL Server Time Zone Support
5.9. The MySQL Log Files
5.9.5.9.1. The Error Log
5.9.5.9.2. The General Query Log
5.9.5.9.3. The Update Log
5.9.5.9.4. The Binary Log
5.9.5.9.5. The Slow Query Log
5.9.5.9.6. Log File Maintenance
5.10. Running Multiple MySQL Servers on the Same Machine
5.10.5.10.1. Running Multiple Servers on Windows
5.10.5.10.2. Running Multiple Servers on Unix
5.10.5.10.3. Using Client Programs in a Multiple-Server Environment
5.11. The MySQL Query Cache
5.11.5.11.1. How the Query Cache Operates
5.11.5.11.2. Query Cache SELECT Options
5.11.5.11.3. Query Cache Configuration
5.11.5.11.4. Query Cache Status and Maintenance
6. Replication in MySQL
6.1. Introduction to Replication
6.2. Replication Implementation Overview
6.3. Replication Implementation Details
6.3.6.3.1. Replication Master Thread States
6.3.6.3.2. Replication Slave I/O Thread States
6.3.6.3.3. Replication Slave SQL Thread States
6.3.6.3.4. Replication Relay and Status Files
6.4. How to Set Up Replication
6.5. Replication Compatibility Between MySQL Versions
6.6. Upgrading a Replication Setup
6.6.6.6.1. Upgrading Replication to 4.0 or 4.1
6.6.6.6.2. Upgrading Replication to 5.0
6.7. Replication Features and Known Problems
6.8. Replication Startup Options
6.9. Replication FAQ
6.10. Troubleshooting Replication
6.11. Reporting Replication Bugs
7. MySQL Optimization
7.1. Optimization Overview
7.1.7.1.1. MySQL Design Limitations and Tradeoffs
7.1.7.1.2. Designing Applications for Portability
7.1.7.1.3. What We Have Used MySQL For
7.1.7.1.4. The MySQL Benchmark Suite
7.1.7.1.5. Using Your Own Benchmarks
7.2. Optimizing SELECT Statements and Other Queries
7.2.7.2.1. EXPLAIN Syntax (Get Information About a SELECT)
7.2.7.2.2. Estimating Query Performance
7.2.7.2.3. Speed of SELECT Queries
7.2.7.2.4. How MySQL Optimizes WHERE Clauses
7.2.7.2.5. Range Optimization
7.2.7.2.6. Index Merge Optimization
7.2.7.2.7. How MySQL Optimizes IS NULL
7.2.7.2.8. How MySQL Optimizes DISTINCT
7.2.7.2.9. How MySQL Optimizes LEFT JOIN and RIGHT JOIN
7.2.7.2.10. How MySQL Optimizes ORDER BY
7.2.7.2.11. How MySQL Optimizes GROUP BY
7.2.7.2.12. How MySQL Optimizes LIMIT
7.2.7.2.13. How to Avoid Table Scans
7.2.7.2.14. Speed of INSERT Statements
7.2.7.2.15. Speed of UPDATE Statements
7.2.7.2.16. Speed of DELETE Statements
7.2.7.2.17. Other Optimization Tips
7.3. Locking Issues
7.3.7.3.1. Locking Methods
7.3.7.3.2. Table Locking Issues
7.4. Optimizing Database Structure
7.4.7.4.1. Design Choices
7.4.7.4.2. Make Your Data as Small as Possible
7.4.7.4.3. Column Indexes
7.4.7.4.4. Multiple-Column Indexes
7.4.7.4.5. How MySQL Uses Indexes
7.4.7.4.6. The MyISAM Key Cache
7.4.7.4.7. How MySQL Counts Open Tables
7.4.7.4.8. How MySQL Opens and Closes Tables
7.4.7.4.9. Drawbacks to Creating Many Tables in the Same Database
7.5. Optimizing the MySQL Server
7.5.7.5.1. System Factors and Startup Parameter Tuning
7.5.7.5.2. Tuning Server Parameters
7.5.7.5.3. Controlling Query Optimizer Performance
7.5.7.5.4. How Compiling and Linking Affects the Speed of MySQL
7.5.7.5.5. How MySQL Uses Memory
7.5.7.5.6. How MySQL Uses DNS
7.6. Disk Issues
7.6.7.6.1. Using Symbolic Links
8. MySQL Client and Utility Programs
8.1. Overview of the Client-Side Scripts and Utilities
8.2. myisampack, the MySQL Compressed Read-only Table Generator
8.3. mysql, the Command-Line Tool
8.3.8.3.1. mysql Commands
8.3.8.3.2. Executing SQL Statements from a Text File
8.3.8.3.3. mysql Tips
8.4. mysqladmin, Administering a MySQL Server
8.5. The mysqlbinlog Binary Log Utility
8.6. mysqlcc, the MySQL Control Center
8.7. The mysqlcheck Table Maintenance and Repair Program
8.8. The mysqldump Database Backup Program
8.9. The mysqlhotcopy Database Backup Program
8.10. The mysqlimport Data Import Program
8.11. mysqlshow, Showing Databases, Tables, and Columns
8.12. perror, Explaining Error Codes
8.13. The replace String-Replacement Utility
9. MySQL Language Reference
10. Language Structure
10.1. Literal Values
10.1.10.1.1. Strings
10.1.10.1.2. Numbers
10.1.10.1.3. Hexadecimal Values
10.1.10.1.4. Boolean Values
10.1.10.1.5. NULL Values
10.2. Database, Table, Index, Column, and Alias Names
10.2.10.2.1. Identifier Qualifiers
10.2.10.2.2. Identifier Case Sensitivity
10.3. User Variables
10.4. System Variables
10.4.10.4.1. Structured System Variables
10.5. Comment Syntax
10.6. Treatment of Reserved Words in MySQL
11. Character Set Support
11.1. Character Sets and Collations in General
11.2. Character Sets and Collations in MySQL
11.3. Determining the Default Character Set and Collation
11.3.11.3.1. Server Character Set and Collation
11.3.11.3.2. Database Character Set and Collation
11.3.11.3.3. Table Character Set and Collation
11.3.11.3.4. Column Character Set and Collation
11.3.11.3.5. Examples of Character Set and Collation Assignment
11.3.11.3.6. Connection Character Sets and Collations
11.3.11.3.7. Character String Literal Character Set and Collation
11.3.11.3.8. Using COLLATE in SQL Statements
11.3.11.3.9. COLLATE Clause Precedence
11.3.11.3.10. BINARY Operator
11.3.11.3.11. Some Special Cases Where the Collation Determination Is Tricky
11.3.11.3.12. Collations Must Be for the Right Character Set
11.3.11.3.13. An Example of the Effect of Collation
11.4. Operations Affected by Character Set Support
11.4.11.4.1. Result Strings
11.4.11.4.2. CONVERT()
11.4.11.4.3. CAST()
11.4.11.4.4. SHOW Statements
11.5. Unicode Support
11.6. UTF8 for Metadata
11.7. Compatibility with Other DBMSs
11.8. New Character Set Configuration File Format
11.9. National Character Set
11.10. Upgrading Character Sets from MySQL 4.0
11.10.11.10.1. 4.0 Character Sets and Corresponding 4.1 Character Set/Collation Pairs
11.10.11.10.2. Converting 4.0 Character Columns to 4.1 Format
11.11. Character Sets and Collations That MySQL Supports
11.11.11.11.1. Unicode Character Sets
11.11.11.11.2. West European Character Sets
11.11.11.11.3. Central European Character Sets
11.11.11.11.4. South European and Middle East Character Sets
11.11.11.11.5. Baltic Character Sets
11.11.11.11.6. Cyrillic Character Sets
11.11.11.11.7. Asian Character Sets
12. Column Types
12.1. Column Type Overview
12.1.12.1.1. Overview of Numeric Types
12.1.12.1.2. Overview of Date and Time Types
12.1.12.1.3. Overview of String Types
12.2. Numeric Types
12.3. Date and Time Types
12.3.12.3.1. The DATETIME, DATE, and TIMESTAMP Types
12.3.12.3.2. The TIME Type
12.3.12.3.3. The YEAR Type
12.3.12.3.4. Y2K Issues and Date Types
12.4. String Types
12.4.12.4.1. The CHAR and VARCHAR Types
12.4.12.4.2. The BLOB and TEXT Types
12.4.12.4.3. The ENUM Type
12.4.12.4.4. The SET Type
12.5. Column Type Storage Requirements
12.6. Choosing the Right Type for a Column
12.7. Using Column Types from Other Database Engines
13. Functions and Operators
13.1. Operators
13.1.13.1.1. Operator Precedence
13.1.13.1.2. Parentheses
13.1.13.1.3. Comparison Functions and Operators
13.1.13.1.4. Logical Operators
13.2. Control Flow Functions
13.3. String Functions
13.3.13.3.1. String Comparison Functions
13.4. Numeric Functions
13.4.13.4.1. Arithmetic Operators
13.4.13.4.2. Mathematical Functions
13.5. Date and Time Functions
13.6. Full-Text Search Functions
13.6.13.6.1. Boolean Full-Text Searches
13.6.13.6.2. Full-Text Searches with Query Expansion
13.6.13.6.3. Full-Text Restrictions
13.6.13.6.4. Fine-Tuning MySQL Full-Text Search
13.6.13.6.5. Full-Text Search TODO
13.7. Cast Functions and Operators
13.8. Other Functions
13.8.13.8.1. Bit Functions
13.8.13.8.2. Encryption Functions
13.8.13.8.3. Information Functions
13.8.13.8.4. Miscellaneous Functions
13.9. Functions and Modifiers for Use with GROUP BY Clauses
13.9.13.9.1. GROUP BY (Aggregate) Functions
13.9.13.9.2. GROUP BY Modifiers
13.9.13.9.3. GROUP BY with Hidden Fields
14. SQL Statement Syntax
14.1. Data Manipulation Statements
14.1.14.1.1. DELETE Syntax
14.1.14.1.2. DO Syntax
14.1.14.1.3. HANDLER Syntax
14.1.14.1.4. INSERT Syntax
14.1.14.1.5. LOAD DATA INFILE Syntax
14.1.14.1.6. REPLACE Syntax
14.1.14.1.7. SELECT Syntax
14.1.14.1.8. Subquery Syntax
14.1.14.1.9. TRUNCATE Syntax
14.1.14.1.10. UPDATE Syntax
14.2. Data Definition Statements
14.2.14.2.1. ALTER DATABASE Syntax
14.2.14.2.2. ALTER TABLE Syntax
14.2.14.2.3. ALTER VIEW Syntax
14.2.14.2.4. CREATE DATABASE Syntax
14.2.14.2.5. CREATE INDEX Syntax
14.2.14.2.6. CREATE TABLE Syntax
14.2.14.2.7. CREATE VIEW Syntax
14.2.14.2.8. DROP DATABASE Syntax
14.2.14.2.9. DROP INDEX Syntax
14.2.14.2.10. DROP TABLE Syntax
14.2.14.2.11. DROP VIEW Syntax
14.2.14.2.12. RENAME TABLE Syntax
14.3. MySQL Utility Statements
14.3.14.3.1. DESCRIBE Syntax (Get Information About Columns)
14.3.14.3.2. USE Syntax
14.4. MySQL Transactional and Locking Statements
14.4.14.4.1. START TRANSACTION, COMMIT, and ROLLBACK Syntax
14.4.14.4.2. Statements That Cannot Be Rolled Back
14.4.14.4.3. Statements That Cause an Implicit Commit
14.4.14.4.4. SAVEPOINT and ROLLBACK TO SAVEPOINT Syntax
14.4.14.4.5. LOCK TABLES and UNLOCK TABLES Syntax
14.4.14.4.6. SET TRANSACTION Syntax
14.5. Database Administration Statements
14.5.14.5.1. Account Management Statements
14.5.14.5.2. Table Maintenance Statements
14.5.14.5.3. SET and SHOW Syntax
14.5.14.5.4. Other Administrative Statements
14.6. Replication Statements
14.6.14.6.1. SQL Statements for Controlling Master Servers
14.6.14.6.2. SQL Statements for Controlling Slave Servers
14.7. SQL Syntax for Prepared Statements
15. MySQL Storage Engines and Table Types
15.1. The MyISAM Storage Engine
15.1.15.1.1. MyISAM Startup Options
15.1.15.1.2. Space Needed for Keys
15.1.15.1.3. MyISAM Table Storage Formats
15.1.15.1.4. MyISAM Table Problems
15.2. The MERGE Storage Engine
15.2.15.2.1. MERGE Table Problems
15.3. The MEMORY (HEAP) Storage Engine
15.4. The BDB (BerkeleyDB) Storage Engine
15.4.15.4.1. Operating Systems Supported by BDB
15.4.15.4.2. Installing BDB
15.4.15.4.3. BDB Startup Options
15.4.15.4.4. Characteristics of BDB Tables
15.4.15.4.5. Things We Need to Fix for BDB
15.4.15.4.6. Restrictions on BDB Tables
15.4.15.4.7. Errors That May Occur When Using BDB Tables
15.5. The ISAM Storage Engine
16. The InnoDB Storage Engine
16.1. InnoDB Overview
16.2. InnoDB Contact Information
16.3. InnoDB in MySQL 3.23
16.4. InnoDB Configuration
16.5. InnoDB Startup Options
16.6. Creating the InnoDB Tablespace
16.6.16.6.1. Dealing with InnoDB Initialization Problems
16.7. Creating InnoDB Tables
16.7.16.7.1. How to Use Transactions in InnoDB with Different APIs
16.7.16.7.2. Converting MyISAM Tables to InnoDB
16.7.16.7.3. How an AUTO_INCREMENT Column Works in InnoDB
16.7.16.7.4. FOREIGN KEY Constraints
16.7.16.7.5. InnoDB and MySQL Replication
16.7.16.7.6. Using Per-Table Tablespaces
16.8. Adding and Removing InnoDB Data and Log Files
16.9. Backing Up and Recovering an InnoDB Database
16.9.16.9.1. Forcing Recovery
16.9.16.9.2. Checkpoints
16.10. Moving an InnoDB Database to Another Machine
16.11. InnoDB Transaction Model and Locking
16.11.16.11.1. InnoDB and AUTOCOMMIT
16.11.16.11.2. InnoDB and TRANSACTION ISOLATION LEVEL
16.11.16.11.3. Consistent Non-Locking Read
16.11.16.11.4. Locking Reads SELECT ... FOR UPDATE and SELECT ... LOCK IN SHARE MODE
16.11.16.11.5. Next-Key Locking: Avoiding the Phantom Problem
16.11.16.11.6. An Example of How the Consistent Read Works in InnoDB
16.11.16.11.7. Locks Set by Different SQL Statements in InnoDB
16.11.16.11.8. When Does MySQL Implicitly Commit or Roll Back a Transaction?
16.11.16.11.9. Deadlock Detection and Rollback
16.11.16.11.10. How to Cope with Deadlocks
16.12. InnoDB Performance Tuning Tips
16.12.16.12.1. SHOW INNODB STATUS and the InnoDB Monitors
16.13. Implementation of Multi-Versioning
16.14. Table and Index Structures
16.14.16.14.1. Physical Structure of an Index
16.14.16.14.2. Insert Buffering
16.14.16.14.3. Adaptive Hash Indexes
16.14.16.14.4. Physical Record Structure
16.15. File Space Management and Disk I/O
16.15.16.15.1. Disk I/O
16.15.16.15.2. Using Raw Devices for the Tablespace
16.15.16.15.3. File Space Management
16.15.16.15.4. Defragmenting a Table
16.16. Error Handling
16.16.16.16.1. InnoDB Error Codes
16.16.16.16.2. Operating System Error Codes
16.17. Restrictions on InnoDB Tables
16.18. InnoDB Troubleshooting
16.18.16.18.1. Troubleshooting InnoDB Data Dictionary Operations
17. MySQL Cluster
17.1. MySQL Cluster Overview
17.2. Basic MySQL Cluster Concepts
17.3. MySQL Cluster Configuration
17.3.17.3.1. Building from Source Code
17.3.17.3.2. Installing the Software
17.3.17.3.3. Quick Test Setup of MySQL Cluster
17.3.17.3.4. Configuration File
17.4. Process Management in MySQL Cluster
17.4.17.4.1. MySQL Server Process Usage for MySQL Cluster
17.4.17.4.2. ndbd, the Storage Engine Node Process
17.4.17.4.3. ndb_mgmd, the Management Server Process
17.4.17.4.4. ndb_mgm, the Management Client Process
17.4.17.4.5. Command Options for MySQL Cluster Processes
17.5. Management of MySQL Cluster
17.5.17.5.1. Commands in the Management Client
17.5.17.5.2. Event Reports Generated in MySQL Cluster
17.5.17.5.3. Single User Mode
17.5.17.5.4. On-line Backup of MySQL Cluster
17.6. Using High-Speed Interconnects with MySQL Cluster
17.6.17.6.1. Configuring MySQL Cluster to use SCI Sockets
17.6.17.6.2. Low-level benchmarks to understand impact of cluster interconnects
18. Introduction to MaxDB
18.1. History of MaxDB
18.2. Licensing and Support
18.3. MaxDB-Related Links
18.4. Basic Concepts of MaxDB
18.5. Feature Differences Between MaxDB and MySQL
18.6. Interoperability Features Between MaxDB and MySQL
18.7. Reserved Words in MaxDB
19. Spatial Extensions in MySQL
19.1. Introduction
19.2. The OpenGIS Geometry Model
19.2.19.2.1. The Geometry Class Hierarchy
19.2.19.2.2. Class Geometry
19.2.19.2.3. Class Point
19.2.19.2.4. Class Curve
19.2.19.2.5. Class LineString
19.2.19.2.6. Class Surface
19.2.19.2.7. Class Polygon
19.2.19.2.8. Class GeometryCollection
19.2.19.2.9. Class MultiPoint
19.2.19.2.10. Class MultiCurve
19.2.19.2.11. Class MultiLineString
19.2.19.2.12. Class MultiSurface
19.2.19.2.13. Class MultiPolygon
19.3. Supported Spatial Data Formats
19.3.19.3.1. Well-Known Text (WKT) Format
19.3.19.3.2. Well-Known Binary (WKB) Format
19.4. Creating a Spatially Enabled MySQL Database
19.4.19.4.1. MySQL Spatial Data Types
19.4.19.4.2. Creating Spatial Values
19.4.19.4.3. Creating Spatial Columns
19.4.19.4.4. Populating Spatial Columns
19.4.19.4.5. Fetching Spatial Data
19.5. Analyzing Spatial Information
19.5.19.5.1. Geometry Format Conversion Functions
19.5.19.5.2. Geometry Functions
19.5.19.5.3. Functions That Create New Geometries from Existing Ones
19.5.19.5.4. Functions for Testing Spatial Relations Between Geometric Objects
19.5.19.5.5. Relations on Geometry Minimal Bounding Rectangles (MBRs)
19.5.19.5.6. Functions That Test Spatial Relationships Between Geometries
19.6. Optimizing Spatial Analysis
19.6.19.6.1. Creating Spatial Indexes
19.6.19.6.2. Using a Spatial Index
19.7. MySQL Conformance and Compatibility
19.7.19.7.1. GIS Features That Are Not Yet Implemented
20. Stored Procedures and Functions
20.1. Stored Procedure Syntax
20.1.20.1.1. Maintaining Stored Procedures
20.1.20.1.2. SHOW PROCEDURE STATUS and SHOW FUNCTION STATUS
20.1.20.1.3. CALL Statement
20.1.20.1.4. BEGIN ... END Compound Statement
20.1.20.1.5. DECLARE Statement
20.1.20.1.6. Variables in Stored Procedures
20.1.20.1.7. Conditions and Handlers
20.1.20.1.8. Cursors
20.1.20.1.9. Flow Control Constructs
21. MySQL APIs
21.1. MySQL Program Development Utilities
21.1.21.1.1. msql2mysql, Convert mSQL Programs for Use with MySQL
21.1.21.1.2. mysql_config, Get compile options for compiling clients
21.2. MySQL C API
21.2.21.2.1. C API Data types
21.2.21.2.2. C API Function Overview
21.2.21.2.3. C API Function Descriptions
21.2.21.2.4. C API Prepared Statements
21.2.21.2.5. C API Prepared Statement Data types
21.2.21.2.6. C API Prepared Statement Function Overview
21.2.21.2.7. C API Prepared Statement Function Descriptions
21.2.21.2.8. C API Handling of Multiple Query Execution
21.2.21.2.9. C API Handling of Date and Time Values
21.2.21.2.10. C API Threaded Function Descriptions
21.2.21.2.11. C API Embedded Server Function Descriptions
21.2.21.2.12. Common questions and problems when using the C API
21.2.21.2.13. Building Client Programs
21.2.21.2.14. How to Make a Threaded Client
21.2.21.2.15. libmysqld, the Embedded MySQL Server Library
21.3. MySQL PHP API
21.3.21.3.1. Common Problems with MySQL and PHP
21.4. MySQL Perl API
21.5. MySQL C++ API
21.5.21.5.1. Borland C++
21.6. MySQL Python API
21.7. MySQL Tcl API
21.8. MySQL Eiffel Wrapper
22. MySQL Connectors
22.1. MySQL ODBC Support
22.1.22.1.1. Introduction to MyODBC
22.1.22.1.2. General Information About ODBC and MyODBC
22.1.22.1.3. How to Install MyODBC
22.1.22.1.4. Installing MyODBC from a Binary Distribution on Windows
22.1.22.1.5. Installing MyODBC from a Binary Distribution on Unix
22.1.22.1.6. Installing MyODBC from a Source Distribution on Windows
22.1.22.1.7. Installing MyODBC from a Source Distribution on Unix
22.1.22.1.8. Installing MyODBC from the BitKeeper Development Source Tree
22.1.22.1.9. MyODBC Configuration
22.1.22.1.10. MyODBC Connection-Related Issues
22.1.22.1.11. MyODBC and Microsoft Access
22.1.22.1.12. MyODBC and Microsoft VBA and ASP
22.1.22.1.13. MyODBC and Third-Party ODBC Tools
22.1.22.1.14. MyODBC General Functionality
22.1.22.1.15. Basic MyODBC Application Steps
22.1.22.1.16. MyODBC API Reference
22.1.22.1.17. MyODBC Data Types
22.1.22.1.18. MyODBC Error Codes
22.1.22.1.19. MyODBC With VB: ADO, DAO and RDO
22.1.22.1.20. MyODBC with Microsoft .NET
22.1.22.1.21. Credits
22.2. MySQL Java Connectivity (JDBC)
23. Error Handling in MySQL
24. Extending MySQL
24.1. MySQL Internals
24.1.24.1.1. MySQL Threads
24.1.24.1.2. MySQL Test Suite
24.2. Adding New Functions to MySQL
24.2.24.2.1. CREATE FUNCTION/DROP FUNCTION Syntax
24.2.24.2.2. Adding a New User-defined Function
24.2.24.2.3. Adding a New Native Function
24.3. Adding New Procedures to MySQL
24.3.24.3.1. Procedure Analyse
24.3.24.3.2. Writing a Procedure
A. Problems and Common Errors
How to Determine What Is Causing a Problem
Common Errors When Using MySQL Programs
Access denied
Can't connect to [local] MySQL server
Client does not support authentication protocol
Password Fails When Entered Interactively
Host 'host_name' is blocked
Too many connections
Out of memory
MySQL server has gone away
Packet too large
Communication Errors and Aborted Connections
The table is full
Can't create/write to file
Commands out of sync
Ignoring user
Table 'tbl_name' doesn't exist
Can't initialize character set
File Not Found
Installation-Related Issues
Problems Linking to the MySQL Client Library
How to Run MySQL as a Normal User
Problems with File Permissions
Administration-Related Issues
How to Reset the Root Password
What to Do If MySQL Keeps Crashing
How MySQL Handles a Full Disk
Where MySQL Stores Temporary Files
How to Protect or Change the MySQL Socket File /tmp/mysql.sock
Time Zone Problems
Query-Related Issues
Case Sensitivity in Searches
Problems Using DATE Columns
Problems with NULL Values
Problems with Column Aliases
Rollback Failure for Non-Transactional Tables
Deleting Rows from Related Tables
Solving Problems with No Matching Rows
Problems with Floating-Point Comparisons
Optimizer-Related Issues
Table Definition-Related Issues
Problems with ALTER TABLE
How to Change the Order of Columns in a Table
TEMPORARY TABLE Problems
B. Credits
Developers at MySQL AB
Contributors to MySQL
Documenters and translators
Libraries used by and included with MySQL
Packages that support MySQL
Tools that were used to create MySQL
Supporters of MySQL
C. MySQL Change History
Changes in release 5.0.x (Development)
Changes in release 5.0.2 (not released yet)
Changes in release 5.0.1 (27 Jul 2004)
Changes in release 5.0.0 (22 Dec 2003: Alpha)
Changes in release 4.1.x (Gamma)
Changes in release 4.1.8 (not released yet)
Changes in release 4.1.7 (to be released soon)
Changes in release 4.1.6 (10 Oct 2004)
Changes in release 4.1.5 (16 Sep 2004)
Changes in release 4.1.4 (26 Aug 2004: Gamma)
Changes in release 4.1.3 (28 Jun 2004: Beta)
Changes in release 4.1.2 (28 May 2004)
Changes in release 4.1.1 (01 Dec 2003)
Changes in release 4.1.0 (03 Apr 2003: Alpha)
Changes in release 4.0.x (Production)
Changes in release 4.0.22 (not released yet)
Changes in release 4.0.21 (06 Sep 2004)
Changes in release 4.0.20 (17 May 2004)
Changes in release 4.0.19 (04 May 2004)
Changes in release 4.0.18 (12 Feb 2004)
Changes in release 4.0.17 (14 Dec 2003)
Changes in release 4.0.16 (17 Oct 2003)
Changes in release 4.0.15 (03 Sep 2003)
Changes in release 4.0.14 (18 Jul 2003)
Changes in release 4.0.13 (16 May 2003)
Changes in release 4.0.12 (15 Mar 2003: Production)
Changes in release 4.0.11 (20 Feb 2003)
Changes in release 4.0.10 (29 Jan 2003)
Changes in release 4.0.9 (09 Jan 2003)
Changes in release 4.0.8 (07 Jan 2003)
Changes in release 4.0.7 (20 Dec 2002)
Changes in release 4.0.6 (14 Dec 2002: Gamma)
Changes in release 4.0.5 (13 Nov 2002)
Changes in release 4.0.4 (29 Sep 2002)
Changes in release 4.0.3 (26 Aug 2002: Beta)
Changes in release 4.0.2 (01 Jul 2002)
Changes in release 4.0.1 (23 Dec 2001)
Changes in release 4.0.0 (Oct 2001: Alpha)
Changes in release 3.23.x (Recent; still supported)
Changes in release 3.23.59 (not released yet)
Changes in release 3.23.58 (11 Sep 2003)
Changes in release 3.23.57 (06 Jun 2003)
Changes in release 3.23.56 (13 Mar 2003)
Changes in release 3.23.55 (23 Jan 2003)
Changes in release 3.23.54 (05 Dec 2002)
Changes in release 3.23.53 (09 Oct 2002)
Changes in release 3.23.52 (14 Aug 2002)
Changes in release 3.23.51 (31 May 2002)
Changes in release 3.23.50 (21 Apr 2002)
Changes in release 3.23.49 (14 Feb 2002)
Changes in release 3.23.48 (07 Feb 2002)
Changes in release 3.23.47 (27 Dec 2001)
Changes in release 3.23.46 (29 Nov 2001)
Changes in release 3.23.45 (22 Nov 2001)
Changes in release 3.23.44 (31 Oct 2001)
Changes in release 3.23.43 (04 Oct 2001)
Changes in release 3.23.42 (08 Sep 2001)
Changes in release 3.23.41 (11 Aug 2001)
Changes in release 3.23.40 (18 Jul 2001)
Changes in release 3.23.39 (12 Jun 2001)
Changes in release 3.23.38 (09 May 2001)
Changes in release 3.23.37 (17 Apr 2001)
Changes in release 3.23.36 (27 Mar 2001)
Changes in release 3.23.35 (15 Mar 2001)
Changes in release 3.23.34a (11 Mar 2001)
Changes in release 3.23.34 (10 Mar 2001)
Changes in release 3.23.33 (09 Feb 2001)
Changes in release 3.23.32 (22 Jan 2001)
Changes in release 3.23.31 (17 Jan 2001: Production)
Changes in release 3.23.30 (04 Jan 2001)
Changes in release 3.23.29 (16 Dec 2000)
Changes in release 3.23.28 (22 Nov 2000: Gamma)
Changes in release 3.23.27 (24 Oct 2000)
Changes in release 3.23.26 (18 Oct 2000)
Changes in release 3.23.25 (29 Sep 2000)
Changes in release 3.23.24 (08 Sep 2000)
Changes in release 3.23.23 (01 Sep 2000)
Changes in release 3.23.22 (31 Jul 2000)
Changes in release 3.23.21 (04 Jul 2000)
Changes in release 3.23.20 (28 Jun 2000: Beta)
Changes in release 3.23.19
Changes in release 3.23.18 (11 Jun 2000)
Changes in release 3.23.17 (07 Jun 2000)
Changes in release 3.23.16 (16 May 2000)
Changes in release 3.23.15 (08 May 2000)
Changes in release 3.23.14 (09 Apr 2000)
Changes in release 3.23.13 (14 Mar 2000)
Changes in release 3.23.12 (07 Mar 2000)
Changes in release 3.23.11 (16 Feb 2000)
Changes in release 3.23.10 (30 Jan 2000)
Changes in release 3.23.9 (29 Jan 2000)
Changes in release 3.23.8 (02 Jan 2000)
Changes in release 3.23.7 (10 Dec 1999)
Changes in release 3.23.6 (15 Nov 1999)
Changes in release 3.23.5 (20 Oct 1999)
Changes in release 3.23.4 (28 Sep 1999)
Changes in release 3.23.3 (13 Sep 1999)
Changes in release 3.23.2 (09 Aug 1999)
Changes in release 3.23.1 (08 Jul 1999)
Changes in release 3.23.0 (05 Jul 1999: Alpha)
Changes in release 3.22.x (Old; discontinued)
Changes in release 3.22.35
Changes in release 3.22.34
Changes in release 3.22.33
Changes in release 3.22.32 (14 Feb 2000)
Changes in release 3.22.31
Changes in release 3.22.30 (11 Jan 2000)
Changes in release 3.22.29 (02 Jan 2000)
Changes in release 3.22.28 (20 Oct 1999)
Changes in release 3.22.27 (05 Oct 1999)
Changes in release 3.22.26 (16 Sep 1999)
Changes in release 3.22.25 (07 Jun 1999)
Changes in release 3.22.24 (05 Jul 1999)
Changes in release 3.22.23 (08 Jun 1999)
Changes in release 3.22.22 (30 Apr 1999)
Changes in release 3.22.21 (04 Apr 1999)
Changes in release 3.22.20 (18 Mar 1999)
Changes in release 3.22.19 (01 Mar 1999)
Changes in release 3.22.18 (26 Feb 1999)
Changes in release 3.22.17 (22 Feb 1999: Production)
Changes in release 3.22.16 (05 Feb 1999)
Changes in release 3.22.15 (27 Jan 1999)
Changes in release 3.22.14 (01 Jan 1999: Gamma)
Changes in release 3.22.13 (16 Dec 1998)
Changes in release 3.22.12 (09 Dec 1998)
Changes in release 3.22.11 (24 Nov 1998)
Changes in release 3.22.10 (04 Nov 1998)
Changes in release 3.22.9 (19 Oct 1998)
Changes in release 3.22.8 (06 Oct 1998)
Changes in release 3.22.7 (21 Sep 1998: Beta)
Changes in release 3.22.6 (31 Aug 1998)
Changes in release 3.22.5 (20 Aug 1998: Alpha)
Changes in release 3.22.4 (06 Jul 1998: Beta)
Changes in release 3.22.3 (30 Jun 1998)
Changes in release 3.22.2
Changes in release 3.22.1 (Jun 1998)
Changes in release 3.22.0 (18 May 1998: Alpha)
Changes in release 3.21.x
Changes in release 3.21.33 (08 Jul 1998)
Changes in release 3.21.32 (30 Jun 1998)
Changes in release 3.21.31 (10 Jun 1998)
Changes in release 3.21.30
Changes in release 3.21.29
Changes in release 3.21.28
Changes in release 3.21.27
Changes in release 3.21.26
Changes in release 3.21.25
Changes in release 3.21.24
Changes in release 3.21.23
Changes in release 3.21.22
Changes in release 3.21.21a
Changes in release 3.21.21
Changes in release 3.21.20
Changes in release 3.21.19
Changes in release 3.21.18
Changes in release 3.21.17
Changes in release 3.21.16
Changes in release 3.21.15
Changes in release 3.21.14b
Changes in release 3.21.14a
Changes in release 3.21.13
Changes in release 3.21.12
Changes in release 3.21.11
Changes in release 3.21.10
Changes in release 3.21.9
Changes in release 3.21.8
Changes in release 3.21.7
Changes in release 3.21.6
Changes in release 3.21.5
Changes in release 3.21.4
Changes in release 3.21.3
Changes in release 3.21.2
Changes in release 3.21.0
Changes in release 3.20.x
Changes in release 3.20.18
Changes in release 3.20.17
Changes in release 3.20.16
Changes in release 3.20.15
Changes in release 3.20.14
Changes in release 3.20.13
Changes in release 3.20.11
Changes in release 3.20.10
Changes in release 3.20.9
Changes in release 3.20.8
Changes in release 3.20.7
Changes in release 3.20.6
Changes in release 3.20.3
Changes in release 3.20.0
Changes in release 3.19.x
Changes in release 3.19.5
Changes in release 3.19.4
Changes in release 3.19.3
InnoDB Change History
MySQL/InnoDB-4.0.21, September 10, 2004
MySQL/InnoDB-4.1.4, August 31, 2004
MySQL/InnoDB-4.1.3, June 28, 2004
MySQL/InnoDB-4.1.2, May 30, 2004
MySQL/InnoDB-4.0.20, May 18, 2004
MySQL/InnoDB-4.0.19, May 4, 2004
MySQL/InnoDB-4.0.18, February 13, 2004
MySQL/InnoDB-5.0.0, December 24, 2003
MySQL/InnoDB-4.0.17, December 17, 2003
MySQL/InnoDB-4.1.1, December 4, 2003
MySQL/InnoDB-4.0.16, October 22, 2003
MySQL/InnoDB-3.23.58, September 15, 2003
MySQL/InnoDB-4.0.15, September 10, 2003
MySQL/InnoDB-4.0.14, July 22, 2003
MySQL/InnoDB-3.23.57, June 20, 2003
MySQL/InnoDB-4.0.13, May 20, 2003
MySQL/InnoDB-4.1.0, April 3, 2003
MySQL/InnoDB-3.23.56, March 17, 2003
MySQL/InnoDB-4.0.12, March 18, 2003
MySQL/InnoDB-4.0.11, February 25, 2003
MySQL/InnoDB-4.0.10, February 4, 2003
MySQL/InnoDB-3.23.55, January 24, 2003
MySQL/InnoDB-4.0.9, January 14, 2003
MySQL/InnoDB-4.0.8, January 7, 2003
MySQL/InnoDB-4.0.7, December 26, 2002
MySQL/InnoDB-4.0.6, December 19, 2002
MySQL/InnoDB-3.23.54, December 12, 2002
MySQL/InnoDB-4.0.5, November 18, 2002
MySQL/InnoDB-3.23.53, October 9, 2002
MySQL/InnoDB-4.0.4, October 2, 2002
MySQL/InnoDB-4.0.3, August 28, 2002
MySQL/InnoDB-3.23.52, August 16, 2002
MySQL/InnoDB-4.0.2, July 10, 2002
MySQL/InnoDB-3.23.51, June 12, 2002
MySQL/InnoDB-3.23.50, April 23, 2002
MySQL/InnoDB-3.23.49, February 17, 2002
MySQL/InnoDB-3.23.48, February 9, 2002
MySQL/InnoDB-3.23.47, December 28, 2001
MySQL/InnoDB-4.0.1, December 23, 2001
MySQL/InnoDB-3.23.46, November 30, 2001
MySQL/InnoDB-3.23.45, November 23, 2001
MySQL/InnoDB-3.23.44, November 2, 2001
MySQL/InnoDB-3.23.43, October 4, 2001
MySQL/InnoDB-3.23.42, September 9, 2001
MySQL/InnoDB-3.23.41, August 13, 2001
MySQL/InnoDB-3.23.40, July 16, 2001
MySQL/InnoDB-3.23.39, June 13, 2001
MySQL/InnoDB-3.23.38, May 12, 2001
MySQL Cluster Change History
MySQL Cluster-4.1.7, (not released yet)
MySQL Cluster-4.1.6, 10 Oct 2004
MySQL Cluster-4.1.5, 16 Sep 2004
MySQL Cluster-4.1.4, 31 Aug 2004
MySQL Cluster-5.0.1, 27 Jul 2004
MySQL Cluster-4.1.3, 28 Jun 2004
D. Porting to Other Systems
Debugging a MySQL Server
Compiling MySQL for Debugging
Creating Trace Files
Debugging mysqld under gdb
Using a Stack Trace
Using Log Files to Find Cause of Errors in mysqld
Making a Test Case If You Experience Table Corruption
Debugging a MySQL Client
The DBUG Package
Comments about RTS Threads
Differences Between Thread Packages
E. Environment Variables
F. MySQL Regular Expressions
G. GNU General Public License
H. MySQL FLOSS License Exception
SQL Command, Type, and Function Index
Concept Index