中文版的MySQL 5.1参考手册 :
http://dev.mysql.com/doc/refman/5.1/zh/index.html
英文版本的MySQL 5.1 Reference Manual :
http://dev.mysql.com/doc/refman/5.1/en/index.html
英文版的MySQL 5.0 Reference Manual :
http://dev.mysql.com/doc/refman/5.0/en/index.html
英文版的MySQL 6.0 Reference Manual :
http://dev.mysql.com/doc/refman/6.0/en/index.html
英文版的MySQL 3.23, 4.0, 4.1 Reference Manual
http://dev.mysql.com/doc/refman/4.1/en/index.html
下载网址:
http://dev.mysql.com/downloads/mysql/6.0.html
MySQL是著名的数据库软件,与Oracle 和SQL Server 2000一样.
这个软件是开源的.
The world's most popular open source database
MySQL 5.1 Reference Manual
Copyright 1997-2008 MySQL AB
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 MySQL 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 MySQL AB. MySQL AB reserves 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 <docs@mysql.com >.
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.1 through 5.1.23-rc.
Document generated on: 2008-01-12 (revision: 9569)
Table of Contents [+/-]
Preface
1. General Information [+/-]
1.1. About This Manual 1.2. Conventions Used in This Manual 1.3. Overview of MySQL AB 1.4. Overview of the MySQL Database Management System [+/-] 1.4.1. What is MySQL? 1.4.2. History of MySQL 1.4.3. The Main Features of MySQL 1.5. MySQL Development Roadmap [+/-] 1.5.1. What's New in MySQL 5.1 1.5.2. What's Planned for MySQL 6.0 1.6. MySQL Information Sources [+/-] 1.6.1. MySQL Mailing Lists 1.6.2. MySQL Community Support at the MySQL Forums 1.6.3. MySQL Community Support on Internet Relay Chat (IRC) 1.6.4. MySQL Enterprise 1.7. How to Report Bugs or Problems 1.8. MySQL Standards Compliance [+/-] 1.8.1. What Standards MySQL Follows 1.8.2. Selecting SQL Modes 1.8.3. Running MySQL in ANSI Mode 1.8.4. MySQL Extensions to Standard SQL 1.8.5. MySQL Differences from Standard SQL 1.8.6. How MySQL Deals with Constraints
2. Installing and Upgrading MySQL [+/-]
2.1. General Installation Issues [+/-] 2.1.1. Operating Systems Supported by MySQL Community Server 2.1.2. Choosing Which MySQL Distribution to Install 2.1.3. How to Get MySQL 2.1.4. Verifying Package Integrity Using MD5 Checksums or GnuPG 2.1.5. Installation Layouts 2.2. Standard MySQL Installation Using a Binary Distribution 2.3. Installing MySQL on Windows [+/-] 2.3.1. Choosing An Installation Package 2.3.2. Installing MySQL with the Automated Installer 2.3.3. Using the MySQL Installation Wizard 2.3.4. Using the Configuration Wizard 2.3.5. Installing MySQL from a Noinstall Zip Archive 2.3.6. Extracting the Install Archive 2.3.7. Creating an Option File 2.3.8. Selecting a MySQL Server Type 2.3.9. Starting the Server for the First Time 2.3.10. Starting MySQL from the Windows Command Line 2.3.11. Starting MySQL as a Windows Service 2.3.12. Testing The MySQL Installation 2.3.13. Troubleshooting a MySQL Installation Under Windows 2.3.14. Upgrading MySQL on Windows 2.3.15. MySQL on Windows Compared to MySQL on Unix 2.4. Installing MySQL from RPM Packages on Linux 2.5. Installing MySQL on Mac OS X 2.6. Installing MySQL on Solaris 2.7. Installing MySQL on NetWare 2.8. Installing MySQL from tar.gz Packages on Other Unix-Like Systems 2.9. MySQL Installation Using a Source Distribution [+/-] 2.9.1. Source Installation Overview 2.9.2. Typical configure Options 2.9.3. Installing from the Development Source Tree 2.9.4. Dealing with Problems Compiling MySQL 2.9.5. MIT-pthreads Notes 2.9.6. Installing MySQL from Source on Windows 2.9.7. Compiling MySQL Clients on Windows 2.10. Post-Installation Setup and Testing [+/-] 2.10.1. Windows Post-Installation Procedures 2.10.2. Unix Post-Installation Procedures 2.10.3. Securing the Initial MySQL Accounts 2.11. Upgrading MySQL [+/-] 2.11.1. Upgrading from MySQL 5.0 to 5.1 2.11.2. Copying MySQL Databases to Another Machine 2.12. Downgrading MySQL [+/-] 2.12.1. Downgrading to MySQL 5.02.13. Operating System-Specific Notes [+/-] 2.13.1. Linux Notes 2.13.2. Mac OS X Notes 2.13.3. Solaris Notes 2.13.4. BSD Notes 2.13.5. Other Unix Notes 2.14. Environment Variables 2.15. Perl Installation Notes [+/-] 2.15.1. Installing Perl on Unix 2.15.2. Installing ActiveState Perl on Windows 2.15.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. Specifying Program Options 4.2.3. 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. mysql_fix_privilege_tables — Upgrade MySQL System Tables 4.4.4. mysql_install_db — Initialize MySQL Data Directory 4.4.5. mysql_secure_installation — Improve MySQL Installation Security 4.4.6. mysql_tzinfo_to_sql — Load the Time Zone Tables 4.4.7. mysql_upgrade — Check Tables for MySQL Upgrade 4.5. MySQL Client Programs [+/-] 4.5.1. mysql — The MySQL Command-Line Tool 4.5.2. mysqladmin — Client for Administering a MySQL Server 4.5.3. mysqlcheck — A Table Maintenance 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.5.7. mysqlslap — Load Emulation Client 4.6. MySQL Administrative and Utility Programs [+/-] 4.6.1. innochecksum — Offline InnoDB File Checksum Utility 4.6.2. myisam_ftdump — Display Full-Text Index information 4.6.3. myisamchk — MyISAM Table-Maintenance Utility 4.6.4. myisamlog — Display MyISAM Log File Contents 4.6.5. myisampack — Generate Compressed, Read-Only MyISAM Tables 4.6.6. mysqlaccess — Client for Checking Access Privileges 4.6.7. mysqlbinlog — Utility for Processing Binary Log Files 4.6.8. 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_find_rows — Extract SQL Statements from Files 4.6.12. mysql_fix_extensions — Normalize Table Filename Extensions 4.6.13. mysql_setpermission — Interactively Set Permissions in Grant Tables 4.6.14. mysql_tableinfo — Generate Database Metadata 4.6.15. mysql_waitpid — Kill Process and Wait for Its Termination 4.6.16. 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. Option and Variable Reference 5.1.2. Command Options 5.1.3. System Variables 5.1.4. Using System Variables 5.1.5. Status Variables 5.1.6. SQL Modes 5.1.7. Server-Side Help 5.1.8. Server Response to Signals 5.1.9. The Shutdown Process 5.2. MySQL Server Logs [+/-] 5.2.1. Selecting General Query and Slow Query Log Output Destinations 5.2.2. The Error Log 5.2.3. The General Query Log 5.2.4. The Binary Log 5.2.5. The Slow Query Log 5.2.6. Server Log Maintenance 5.3. 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. Connecting to the MySQL Server 5.4.5. Access Control, Stage 1: Connection Verification 5.4.6. Access Control, Stage 2: Request Verification 5.4.7. When Privilege Changes Take Effect 5.4.8. Causes of Access denied Errors 5.4.9. 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 Your Password Secure 5.5.7. Using Secure Connections 5.6. Backup and Recovery [+/-] 5.6.1. Database Backups 5.6.2. Example Backup and Recovery Strategy 5.6.3. Point-in-Time Recovery 5.6.4. Table Maintenance and Crash Recovery 5.7. Running Multiple MySQL Servers on the Same Machine [+/-] 5.7.1. Running Multiple Servers on Windows 5.7.2. Running Multiple Servers on Unix 5.7.3. Using Client Programs in a Multiple-Server Environment
6. Optimization [+/-]
6.1. Optimization Overview [+/-] 6.1.1. MySQL Design Limitations and Tradeoffs 6.1.2. Designing Applications for Portability 6.1.3. What We Have Used MySQL For 6.1.4. The MySQL Benchmark Suite 6.1.5. Using Your Own Benchmarks 6.2. Optimizing SELECT and Other Statements [+/-] 6.2.1. Optimizing Queries with EXPLAIN 6.2.2. Estimating Query Performance 6.2.3. Speed of SELECT Queries 6.2.4. WHERE Clause Optimization 6.2.5. Range Optimization 6.2.6. Index Merge Optimization 6.2.7. IS NULL Optimization 6.2.8. LEFT JOIN and RIGHT JOIN Optimization 6.2.9. Nested Join Optimization 6.2.10. Outer Join Simplification 6.2.11. ORDER BY Optimization 6.2.12. GROUP BY Optimization 6.2.13. DISTINCT Optimization 6.2.14. Optimizing IN/=ANY Subqueries 6.2.15. LIMIT Optimization 6.2.16. How to Avoid Table Scans 6.2.17. INFORMATION_SCHEMA Optimization 6.2.18. Speed of INSERT Statements 6.2.19. Speed of UPDATE Statements 6.2.20. Speed of DELETE Statements 6.2.21. Other Optimization Tips 6.3. Locking Issues [+/-] 6.3.1. Internal Locking Methods 6.3.2. Table Locking Issues 6.3.3. Concurrent Inserts 6.3.4. External Locking 6.4. Optimizing Database Structure [+/-] 6.4.1. Design Choices 6.4.2. Make Your Data as Small as Possible 6.4.3. Column Indexes 6.4.4. Multiple-Column Indexes 6.4.5. How MySQL Uses Indexes 6.4.6. The MyISAM Key Cache 6.4.7. MyISAM Index Statistics Collection 6.4.8. How MySQL Opens and Closes Tables 6.4.9. Drawbacks to Creating Many Tables in the Same Database 6.5. Optimizing the MySQL Server [+/-] 6.5.1. System Factors and Startup Parameter Tuning 6.5.2. Tuning Server Parameters 6.5.3. Controlling Query Optimizer Performance 6.5.4. The MySQL Query Cache 6.5.5. Examining Thread Information 6.5.6. How Compiling and Linking Affects the Speed of MySQL 6.5.7. How MySQL Uses Memory 6.5.8. How MySQL Uses Internal Temporary Tables 6.5.9. How MySQL Uses DNS 6.6. Disk Issues [+/-] 6.6.1. Using Symbolic Links
7. Language Structure [+/-]
7.1. Literal Values [+/-] 7.1.1. Strings 7.1.2. Numbers 7.1.3. Hexadecimal Values 7.1.4. Boolean Values 7.1.5. Bit-Field Values 7.1.6. NULL Values 7.2. Schema Object Names [+/-] 7.2.1. Identifier Qualifiers 7.2.2. Identifier Case Sensitivity 7.2.3. Mapping of Identifiers to Filenames 7.2.4. Function Name Parsing and Resolution 7.3. Reserved Words 7.4. User-Defined Variables 7.5. Comment Syntax
8. Internationalization and Localization [+/-]
8.1. Character Set Support [+/-] 8.1.1. Character Sets and Collations in General 8.1.2. Character Sets and Collations in MySQL 8.1.3. Specifying Character Sets and Collations 8.1.4. Connection Character Sets and Collations 8.1.5. Collation Issues 8.1.6. String Repertoire 8.1.7. Operations Affected by Character Set Support 8.1.8. Unicode Support 8.1.9. UTF-8 for Metadata 8.1.10. Column Character Set Conversion 8.1.11. Character Sets and Collations That MySQL Supports 8.2. The Character Set Used for Data and Sorting [+/-] 8.2.1. Using the German Character Set8.3. Setting the Error Message Language 8.4. Adding a New Character Set 8.5. The Character Definition Arrays 8.6. String Collating Support 8.7. Multi-Byte Character Support 8.8. Problems With Character Sets 8.9. MySQL Server Time Zone Support 8.10. MySQL Server Locale Support
9. Data Types [+/-]
9.1. Data Type Overview [+/-] 9.1.1. Overview of Numeric Types 9.1.2. Overview of Date and Time Types 9.1.3. Overview of String Types 9.1.4. Data Type Default Values 9.2. Numeric Types 9.3. Date and Time Types [+/-] 9.3.1. The DATETIME, DATE, and TIMESTAMP Types 9.3.2. The TIME Type 9.3.3. The YEAR Type 9.3.4. Year 2000 Issues and Date Types 9.4. String Types [+/-] 9.4.1. The CHAR and VARCHAR Types 9.4.2. The BINARY and VARBINARY Types 9.4.3. The BLOB and TEXT Types 9.4.4. The ENUM Type 9.4.5. The SET Type 9.5. Data Type Storage Requirements 9.6. Choosing the Right Type for a Column 9.7. Using Data Types from Other Database Engines
10. Functions and Operators [+/-]
10.1. Operator and Function Reference 10.2. Operators [+/-] 10.2.1. Operator Precedence 10.2.2. Type Conversion in Expression Evaluation 10.2.3. Comparison Functions and Operators 10.2.4. Logical Operators 10.3. Control Flow Functions 10.4. String Functions [+/-] 10.4.1. String Comparison Functions 10.4.2. Regular Expressions 10.5. Numeric Functions [+/-] 10.5.1. Arithmetic Operators 10.5.2. Mathematical Functions 10.6. Date and Time Functions 10.7. What Calendar Is Used By MySQL? 10.8. Full-Text Search Functions [+/-] 10.8.1. Natural Language Full-Text Searches 10.8.2. Boolean Full-Text Searches 10.8.3. Full-Text Searches with Query Expansion 10.8.4. Full-Text Stopwords 10.8.5. Full-Text Restrictions 10.8.6. Fine-Tuning MySQL Full-Text Search 10.9. Cast Functions and Operators 10.10. XML Functions 10.11. Other Functions [+/-] 10.11.1. Bit Functions 10.11.2. Encryption and Compression Functions 10.11.3. Information Functions 10.11.4. Miscellaneous Functions 10.12. Functions and Modifiers for Use with GROUP BY Clauses [+/-] 10.12.1. GROUP BY (Aggregate) Functions 10.12.2. GROUP BY Modifiers 10.12.3. GROUP BY and HAVING with Hidden Fields
11. SQL Statement Syntax [+/-]
11.1. Data Definition Statements [+/-] 11.1.1. ALTER DATABASE Syntax 11.1.2. ALTER LOGFILE GROUP Syntax 11.1.3. ALTER SERVER Syntax 11.1.4. ALTER TABLE Syntax 11.1.5. ALTER TABLESPACE Syntax 11.1.6. CREATE DATABASE Syntax 11.1.7. CREATE INDEX Syntax 11.1.8. CREATE LOGFILE GROUP Syntax 11.1.9. CREATE SERVER Syntax 11.1.10. CREATE TABLE Syntax 11.1.11. CREATE TABLESPACE Syntax 11.1.12. DROP DATABASE Syntax 11.1.13. DROP INDEX Syntax 11.1.14. DROP LOGFILE GROUP Syntax 11.1.15. DROP SERVER Syntax 11.1.16. DROP TABLE Syntax 11.1.17. DROP TABLESPACE Syntax 11.1.18. RENAME DATABASE Syntax 11.1.19. RENAME TABLE Syntax 11.2. Data Manipulation Statements [+/-] 11.2.1. DELETE Syntax 11.2.2. DO Syntax 11.2.3. HANDLER Syntax 11.2.4. INSERT Syntax 11.2.5. LOAD DATA INFILE Syntax 11.2.6. REPLACE Syntax 11.2.7. SELECT Syntax 11.2.8. Subquery Syntax 11.2.9. TRUNCATE Syntax 11.2.10. UPDATE Syntax 11.3. MySQL Utility Statements [+/-] 11.3.1. DESCRIBE Syntax 11.3.2. HELP Syntax 11.3.3. USE Syntax 11.4. MySQL Transactional and Locking Statements [+/-] 11.4.1. START TRANSACTION, COMMIT, and ROLLBACK Syntax 11.4.2. Statements That Cannot Be Rolled Back 11.4.3. Statements That Cause an Implicit Commit 11.4.4. SAVEPOINT and ROLLBACK TO SAVEPOINT Syntax 11.4.5. LOCK TABLES and UNLOCK TABLES Syntax 11.4.6. SET TRANSACTION Syntax 11.4.7. XA Transactions 11.5. Database Administration Statements [+/-] 11.5.1. Account Management Statements 11.5.2. Table Maintenance Statements 11.5.3. SET Syntax 11.5.4. SHOW Syntax 11.5.5. Other Administrative Statements 11.6. Replication Statements [+/-] 11.6.1. SQL Statements for Controlling Master Servers 11.6.2. SQL Statements for Controlling Slave Servers 11.7. SQL Syntax for Prepared Statements
12. Storage Engines [+/-]
12.1. Overview of MySQL Storage Engine Architecture [+/-] 12.1.1. The Common Database Server Layer 12.1.2. Pluggable Storage Engine Architecture 12.2. Supported Storage Engines [+/-] 12.2.1. Choosing a Storage Engine 12.2.2. Comparing Transaction and Non-Transaction Engines 12.2.3. Other Storage Engines 12.3. Setting the Storage Engine 12.4. The MyISAM Storage Engine [+/-] 12.4.1. MyISAM Startup Options 12.4.2. Space Needed for Keys 12.4.3. MyISAM Table Storage Formats 12.4.4. MyISAM Table Problems 12.5. The InnoDB Storage Engine [+/-] 12.5.1. InnoDB Overview 12.5.2. InnoDB Contact Information 12.5.3. InnoDB Configuration 12.5.4. InnoDB Startup Options and System Variables 12.5.5. Creating the InnoDB Tablespace 12.5.6. Creating and Using InnoDB Tables 12.5.7. Adding and Removing InnoDB Data and Log Files 12.5.8. Backing Up and Recovering an InnoDB Database 12.5.9. Moving an InnoDB Database to Another Machine 12.5.10. InnoDB Transaction Model and Locking 12.5.11. InnoDB Performance Tuning Tips 12.5.12. Implementation of Multi-Versioning 12.5.13. InnoDB Table and Index Structures 12.5.14. InnoDB File Space Management and Disk I/O 12.5.15. InnoDB Error Handling 12.5.16. Restrictions on InnoDB Tables 12.5.17. InnoDB Troubleshooting 12.6. The MERGE Storage Engine [+/-] 12.6.1. MERGE Table Problems12.7. The MEMORY (HEAP) Storage Engine 12.8. The EXAMPLE Storage Engine 12.9. The FEDERATED Storage Engine [+/-] 12.9.1. FEDERATED Storage Engine Overview 12.9.2. How to Create FEDERATED Tables 12.9.3. FEDERATED Storage Engine Notes and Tips 12.9.4. FEDERATED Storage Engine Resources 12.10. The ARCHIVE Storage Engine 12.11. The CSV Storage Engine [+/-] 12.11.1. Repairing and Checking CSV Tables 12.11.2. CSV Limitations 12.12. The BLACKHOLE Storage Engine
13. High Availability, Scalability, and DRBD [+/-]
13.1. Using MySQL with DRBD for High Availability [+/-] 13.1.1. Configuring a MySQL and DRBD Environment 13.1.2. Configuring MySQL for DRBD 13.1.3. Optimizing Performance and Reliability 13.2. Using Linux HA Heartbeat [+/-] 13.2.1. Heartbeat Configuration 13.2.2. Using Heartbeat with MySQL and DRBD 13.2.3. Using Heartbeat with DRBD and dopd 13.2.4. Dealing with System Level Errors
14. Replication [+/-]
14.1. Replication Configuration [+/-] 14.1.1. How to Set Up Replication 14.1.2. Replication Formats 14.1.3. Replication Options and Variables 14.1.4. Common Replication Administration Tasks 14.2. Replication Solutions [+/-] 14.2.1. Using Replication for Backups 14.2.2. Using Replication with Different Master and Slave Storage Engines 14.2.3. Using Replication for Scale-Out 14.2.4. Replicating Different Databases to Different Slaves 14.2.5. Improving Replication Performance 14.2.6. Switching Masters During Failover 14.2.7. Setting Up Replication Using SSL 14.3. Replication Notes and Tips [+/-] 14.3.1. Replication Features and Issues 14.3.2. Replication Compatibility Between MySQL Versions 14.3.3. Upgrading a Replication Setup 14.3.4. Replication FAQ 14.3.5. Troubleshooting Replication 14.3.6. How to Report Replication Bugs or Problems 14.4. Replication Implementation [+/-] 14.4.1. Replication Implementation Details 14.4.2. Replication Relay and Status Files 14.4.3. How Servers Evaluate Replication Rules
15. MySQL Cluster [+/-]
15.1. MySQL Cluster Overview [+/-] 15.1.1. MySQL Cluster Core Concepts 15.1.2. MySQL Cluster Nodes, Node Groups, Replicas, and Partitions 15.2. MySQL Cluster 5.1 Carrier Grade Edition [+/-] 15.2.1. Major Differences Between MySQL 5.1 and MySQL Cluster 5.1 Carrier Grade Edition 15.2.2. MySQL Cluster 5.1 Carrier Grade Edition Releases 15.3. Simple Multi-Computer How-To [+/-] 15.3.1. Hardware, Software, and Networking 15.3.2. Multi-Computer Installation 15.3.3. Multi-Computer Configuration 15.3.4. Initial Startup 15.3.5. Loading Sample Data and Performing Queries 15.3.6. Safe Shutdown and Restart 15.4. MySQL Cluster Configuration [+/-] 15.4.1. Building MySQL Cluster from Source Code 15.4.2. Installing the Cluster Software 15.4.3. Quick Test Setup of MySQL Cluster 15.4.4. Configuration File 15.4.5. Overview of Cluster Configuration Parameters 15.4.6. Configuring Parameters for Local Checkpoints 15.5. Upgrading and Downgrading MySQL Cluster [+/-] 15.5.1. Performing a Rolling Restart of the Cluster 15.5.2. Cluster Upgrade and Downgrade Compatibility 15.6. Process Management in MySQL Cluster [+/-] 15.6.1. MySQL Server Process Usage for MySQL Cluster 15.6.2. ndbd — The Storage Engine Node Process 15.6.3. ndb_mgmd — The Management Server Process 15.6.4. ndb_mgm — The Management Client Process 15.6.5. Command Options for MySQL Cluster Processes 15.7. Management of MySQL Cluster [+/-] 15.7.1. Summary of MySQL Cluster Start Phases 15.7.2. Commands in the MySQL Cluster Management Client 15.7.3. Event Reports Generated in MySQL Cluster 15.7.4. Single User Mode 15.7.5. Quick Reference: MySQL Cluster SQL Statements 15.8. On-line Backup of MySQL Cluster [+/-] 15.8.1. Cluster Backup Concepts 15.8.2. Using The Management Client to Create a Backup 15.8.3. ndb_restore — Restore a Cluster Backup 15.8.4. Configuration for Cluster Backup 15.8.5. Backup Troubleshooting 15.9. Cluster Utility Programs [+/-] 15.9.1. ndb_config — Extract NDB Configuration Information 15.9.2. ndb_cpcd — Automate Testing for NDB Development 15.9.3. ndb_delete_all — Delete All Rows from NDB Table 15.9.4. ndb_desc — Describe NDB Tables 15.9.5. ndb_drop_index — Drop Index from NDB Table 15.9.6. ndb_drop_table — Drop NDB Table 15.9.7. ndb_error_reporter — NDB Error-Reporting Utility 15.9.8. ndb_print_backup_file — Print NDB Backup File Contents 15.9.9. ndb_print_schema_file — Print NDB Schema File Contents 15.9.10. ndb_print_sys_file — Print NDB System File Contents 15.9.11. ndbd_redo_log_reader — Check and Print Content of Cluster Redo Log 15.9.12. ndb_select_all — Print Rows from NDB Table 15.9.13. ndb_select_count — Print Row Counts for NDB Tables 15.9.14. ndb_show_tables — Display List of NDB Tables 15.9.15. ndb_size.pl — NDBCluster Size Requirement Estimator 15.9.16. ndb_waiter — Wait for Cluster to Reach a Given Status 15.10. MySQL Cluster Replication [+/-] 15.10.1. Abbreviations and Symbols 15.10.2. Assumptions and General Requirements 15.10.3. Known Issues in MySQL Cluster Replication 15.10.4. Cluster Replication Schema and Tables 15.10.5. Preparing the Cluster for Replication 15.10.6. Starting Replication (Single Replication Channel) 15.10.7. Using Two Replication Channels 15.10.8. Implementing Failover with MySQL Cluster 15.10.9. MySQL Cluster Backups With Replication 15.10.10. MySQL Cluster Replication Conflict Resolution 15.11. MySQL Cluster Disk Data Tables [+/-] 15.11.1. Disk Data Objects 15.11.2. Disk Data Storage Requirements 15.11.3. Disk Data Configuration Parameters 15.12. Using High-Speed Interconnects with MySQL Cluster [+/-] 15.12.1. Configuring MySQL Cluster to use SCI Sockets 15.12.2. Understanding the Impact of Cluster Interconnects 15.13. Known Limitations of MySQL Cluster [+/-] 15.13.1. Non-Compliance In SQL Syntax 15.13.2. Limits and Differences from Standard MySQL Limits 15.13.3. Limits Relating to Transaction Handling 15.13.4. Error Handling 15.13.5. Limits Associated with Database Objects 15.13.6. Unsupported Or Missing Features 15.13.7. Limitations Relating to Performance 15.13.8. Issues Exclusive to MySQL Cluster 15.13.9. Limitations Relating to Disk Data Storage 15.13.10. Limitations Relating to Multiple Cluster Nodes 15.13.11. Previous MySQL Cluster Issues Resolved in MySQL 5.1 15.14. MySQL Cluster Development Roadmap [+/-] 15.14.1. MySQL Cluster Changes in MySQL 5.115.15. MySQL Cluster Glossary
16. Partitioning [+/-]
16.1. Overview of Partitioning in MySQL 16.2. Partition Types [+/-] 16.2.1. RANGE Partitioning 16.2.2. LIST Partitioning 16.2.3. HASH Partitioning 16.2.4. KEY Partitioning 16.2.5. Subpartitioning 16.2.6. How MySQL Partitioning Handles NULL Values 16.3. Partition Management [+/-] 16.3.1. Management of RANGE and LIST Partitions 16.3.2. Management of HASH and KEY Partitions 16.3.3. Maintenance of Partitions 16.3.4. Obtaining Information About Partitions 16.4. Partition Pruning 16.5. Restrictions and Limitations on Partitioning [+/-] 16.5.1. Partitioning Keys, Primary Keys, and Unique Keys 16.5.2. Partitioning Limitations Relating to Storage Engines 16.5.3. Partitioning Limitations Relating to Functions
17. Spatial Extensions [+/-]
17.1. Introduction to MySQL Spatial Support 17.2. The OpenGIS Geometry Model [+/-] 17.2.1. The Geometry Class Hierarchy 17.2.2. Class Geometry 17.2.3. Class Point 17.2.4. Class Curve 17.2.5. Class LineString 17.2.6. Class Surface 17.2.7. Class Polygon 17.2.8. Class GeometryCollection 17.2.9. Class MultiPoint 17.2.10. Class MultiCurve 17.2.11. Class MultiLineString 17.2.12. Class MultiSurface 17.2.13. Class MultiPolygon 17.3. Supported Spatial Data Formats [+/-] 17.3.1. Well-Known Text (WKT) Format 17.3.2. Well-Known Binary (WKB) Format 17.4. Creating a Spatially Enabled MySQL Database [+/-] 17.4.1. MySQL Spatial Data Types 17.4.2. Creating Spatial Values 17.4.3. Creating Spatial Columns 17.4.4. Populating Spatial Columns 17.4.5. Fetching Spatial Data 17.5. Analyzing Spatial Information [+/-] 17.5.1. Geometry Format Conversion Functions 17.5.2. Geometry Functions 17.5.3. Functions That Create New Geometries from Existing Ones 17.5.4. Functions for Testing Spatial Relations Between Geometric Objects 17.5.5. Relations on Geometry Minimal Bounding Rectangles (MBRs) 17.5.6. Functions That Test Spatial Relationships Between Geometries 17.6. Optimizing Spatial Analysis [+/-] 17.6.1. Creating Spatial Indexes 17.6.2. Using a Spatial Index 17.7. MySQL Conformance and Compatibility
18. Stored Procedures and Functions [+/-]
18.1. Stored Routines and the Grant Tables 18.2. Stored Routine Syntax [+/-] 18.2.1. CREATE PROCEDURE and CREATE FUNCTION Syntax 18.2.2. ALTER PROCEDURE and ALTER FUNCTION Syntax 18.2.3. DROP PROCEDURE and DROP FUNCTION Syntax 18.2.4. CALL Statement Syntax 18.2.5. BEGIN ... END Compound Statement Syntax 18.2.6. DECLARE Statement Syntax 18.2.7. Variables in Stored Routines 18.2.8. Conditions and Handlers 18.2.9. Cursors 18.2.10. Flow Control Constructs 18.3. Stored Procedures, Functions, Triggers, and LAST_INSERT_ID() 18.4. Binary Logging of Stored Routines and Triggers
19. Triggers [+/-]
19.1. CREATE TRIGGER Syntax 19.2. DROP TRIGGER Syntax 19.3. Using Triggers
20. Event Scheduler [+/-]
20.1. Event Scheduler Overview 20.2. Event Scheduler Syntax [+/-] 20.2.1. ALTER EVENT Syntax 20.2.2. CREATE EVENT Syntax 20.2.3. DROP EVENT Syntax 20.3. Event Metadata 20.4. Event Scheduler Status 20.5. The Event Scheduler and MySQL Privileges 20.6. Event Scheduler Limitations and Restrictions
21. Views [+/-]
21.1. ALTER VIEW Syntax 21.2. CREATE VIEW Syntax 21.3. DROP VIEW Syntax
22. INFORMATION_SCHEMA Tables [+/-]
22.1. The INFORMATION_SCHEMA SCHEMATA Table 22.2. The INFORMATION_SCHEMA TABLES Table 22.3. The INFORMATION_SCHEMA COLUMNS Table 22.4. The INFORMATION_SCHEMA STATISTICS Table 22.5. The INFORMATION_SCHEMA USER_PRIVILEGES Table 22.6. The INFORMATION_SCHEMA SCHEMA_PRIVILEGES Table 22.7. The INFORMATION_SCHEMA TABLE_PRIVILEGES Table 22.8. The INFORMATION_SCHEMA COLUMN_PRIVILEGES Table 22.9. The INFORMATION_SCHEMA CHARACTER_SETS Table 22.10. The INFORMATION_SCHEMA COLLATIONS Table 22.11. The INFORMATION_SCHEMA COLLATION_CHARACTER_SET_APPLICABILITY Table 22.12. The INFORMATION_SCHEMA TABLE_CONSTRAINTS Table 22.13. The INFORMATION_SCHEMA KEY_COLUMN_USAGE Table 22.14. The INFORMATION_SCHEMA ROUTINES Table 22.15. The INFORMATION_SCHEMA VIEWS Table 22.16. The INFORMATION_SCHEMA TRIGGERS Table 22.17. The INFORMATION_SCHEMA PLUGINS Table 22.18. The INFORMATION_SCHEMA ENGINES Table 22.19. The INFORMATION_SCHEMA PARTITIONS Table 22.20. The INFORMATION_SCHEMA EVENTS Table 22.21. The INFORMATION_SCHEMA FILES Table 22.22. The INFORMATION_SCHEMA PROCESSLIST Table 22.23. The INFORMATION_SCHEMA REFERENTIAL_CONSTRAINTS Table 22.24. The INFORMATION_SCHEMA GLOBAL_STATUS and SESSION_STATUS Tables 22.25. The INFORMATION_SCHEMA GLOBAL_VARIABLES and SESSION_VARIABLES Tables 22.26. Other INFORMATION_SCHEMA Tables 22.27. Extensions to SHOW Statements
23. Precision Math [+/-]
23.1. Types of Numeric Values 23.2. DECIMAL Data Type Changes 23.3. Expression Handling 23.4. Rounding Behavior 23.5. Precision Math Examples
24. APIs and Libraries [+/-]
24.1. libmysqld, the Embedded MySQL Server Library [+/-] 24.1.1. Compiling Programs with libmysqld 24.1.2. Restrictions When Using the Embedded MySQL Server 24.1.3. Options with the Embedded Server 24.1.4. Embedded Server Examples 24.1.5. Licensing the Embedded Server 24.2. MySQL C API [+/-] 24.2.1. C API Data Types 24.2.2. C API Function Overview 24.2.3. C API Function Descriptions 24.2.4. C API Prepared Statements 24.2.5. C API Prepared Statement Data types 24.2.6. C API Prepared Statement Function Overview 24.2.7. C API Prepared Statement Function Descriptions 24.2.8. C API Prepared Statement Problems 24.2.9. C API Handling of Multiple Statement Execution 24.2.10. C API Handling of Date and Time Values 24.2.11. C API Threaded Function Descriptions 24.2.12. C API Embedded Server Function Descriptions 24.2.13. Controlling Automatic Reconnect Behavior 24.2.14. Common Questions and Problems When Using the C API 24.2.15. Building Client Programs 24.2.16. How to Make a Threaded Client 24.3. MySQL PHP API [+/-] 24.3.1. Common Problems with MySQL and PHP 24.3.2. Enabling Both mysql and mysqli in PHP 24.4. MySQL Perl API 24.5. MySQL C++ API 24.6. MySQL Python API 24.7. MySQL Tcl API 24.8. MySQL Eiffel Wrapper
25. Connectors [+/-]
25.1. MySQL Connector/ODBC [+/-] 25.1.1. Connector/ODBC Versions 25.1.2. Introduction to Connector/ODBC 25.1.3. Connector/ODBC Installation 25.1.4. Connector/ODBC Configuration 25.1.5. Connector/ODBC Examples 25.1.6. Connector/ODBC Reference 25.1.7. Connector/ODBC Notes and Tips 25.1.8. Connector/ODBC Support 25.2. MySQL Connector/NET [+/-] 25.2.1. Connector/NET Versions 25.2.2. Connector/NET Installation 25.2.3. Connector/NET Examples and Usage Guide 25.2.4. Connector/NET Reference 25.2.5. Connector/NET Notes and Tips 25.2.6. Connector/NET Support 25.3. MySQL Visual Studio Plugin [+/-] 25.3.1. Installing the MySQL Visual Studio Plugin 25.3.2. Creating a connection to the MySQL server 25.3.3. Using the MySQL Visual Studio Plugin 25.3.4. Visual Studio Plugin Support 25.4. MySQL Connector/J [+/-] 25.4.1. Connector/J Versions 25.4.2. Connector/J Installation 25.4.3. Connector/J Examples 25.4.4. Connector/J (JDBC) Reference 25.4.5. Connector/J Notes and Tips 25.4.6. Connector/J Support 25.5. MySQL Connector/MXJ [+/-] 25.5.1. Introduction to Connector/MXJ 25.5.2. Connector/MXJ Installation 25.5.3. Connector/MXJ Configuration 25.5.4. Connector/MXJ Reference 25.5.5. Connector/MXJ Notes and Tips 25.5.6. Connector/MXJ Support 25.6. Connector/PHP
26. MySQL Proxy [+/-]
26.1. MySQL Proxy Supported Platforms 26.2. Installing MySQL Proxy [+/-] 26.2.1. Installing MySQL Proxy from a binary distribution 26.2.2. Installing MySQL Proxy from a source distribution 26.2.3. Installing MySQL Proxy from the Subversion repository 26.3. MySQL Proxy Command Line Options 26.4. MySQL Proxy Scripting [+/-] 26.4.1. Proxy Scripting Sequence During Query Injection 26.4.2. Internal Structures 26.4.3. Capturing a connection with connect_server() 26.4.4. Examining the handshake with read_handshake() 26.4.5. Examining the authentication credentials with read_auth() 26.4.6. Accessing authentication information with read_auth_result() 26.4.7. Manipulating Queries with read_query() 26.4.8. Manipulating Results with read_query_result() 26.5. Using MySQL Proxy [+/-] 26.5.1. Using the Administration Interface
27. Extending MySQL [+/-]
27.1. MySQL Internals [+/-] 27.1.1. MySQL Threads 27.1.2. MySQL Test Suite 27.2. The MySQL Plugin Interface [+/-] 27.2.1. Characteristics of the Plugin Interface 27.2.2. Full-Text Parser Plugins 27.2.3. INSTALL PLUGIN Syntax 27.2.4. UNINSTALL PLUGIN Syntax 27.2.5. Writing Plugins 27.3. Adding New Functions to MySQL [+/-] 27.3.1. Features of the User-Defined Function Interface 27.3.2. CREATE FUNCTION Syntax 27.3.3. DROP FUNCTION Syntax 27.3.4. Adding a New User-Defined Function 27.3.5. Adding a New Native Function 27.4. Adding New Procedures to MySQL [+/-] 27.4.1. Procedure Analyse 27.4.2. Writing a Procedure 27.5. Debugging and Porting MySQL [+/-] 27.5.1. Debugging a MySQL Server 27.5.2. Debugging a MySQL Client 27.5.3. The DBUG Package 27.5.4. Comments about RTS Threads 27.5.5. Differences Between Thread Packages
A. MySQL 5.1 Frequently Asked Questions [+/-]
A.1. MySQL 5.1 FAQ — General A.2. MySQL 5.1 FAQ — Storage Engines A.3. MySQL 5.1 FAQ — Server SQL Mode A.4. MySQL 5.1 FAQ — Stored Procedures A.5. MySQL 5.1 FAQ — Triggers A.6. MySQL 5.1 FAQ — Views A.7. MySQL 5.0 FAQ — INFORMATION_SCHEMA A.8. MySQL 5.1 FAQ — Migration A.9. MySQL 5.1 FAQ — Security A.10. MySQL 5.1 FAQ — MySQL Cluster A.11. MySQL 5.1 FAQ — MySQL Chinese, Japanese, and Korean Character Sets A.12. MySQL 5.1 FAQ — Connectors & APIs A.13. MySQL 5.1 FAQ — Replication A.14. MySQL 5.1 FAQ — MySQL, DRBD, and Heartbeat [+/-] A.14.1. Distributed Replicated Block Device 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. Server Error Codes and Messages B.3. Client Error Codes and Messages
C. MySQL Change History [+/-]
C.1. Changes in release 5.1.x (Development) [+/-] C.1.1. Changes in MySQL 5.1.23 (Not yet released) C.1.2. Changes in MySQL 5.1.23 Carrier Grade Edition C.1.3. Changes in MySQL 5.1.22 (24 September 2007: Release Candidate) C.1.4. Changes in MySQL 5.1.22 Carrier Grade Edition C.1.5. Changes in MySQL 5.1.21 (16 August 2007) C.1.6. Changes in MySQL 5.1.20 (25 June 2007) C.1.7. Changes in MySQL 5.1.19 (25 May 2007) C.1.8. Changes in MySQL 5.1.19 Carrier Grade Edition C.1.9. Changes in MySQL 5.1.18 (08 May 2007) C.1.10. Changes in MySQL 5.1.18 Carrier Grade Edition C.1.11. Changes in MySQL 5.1.17 (04 April 2007) C.1.12. Changes in MySQL 5.1.16 (26 February 2007) C.1.13. Changes in MySQL 5.1.16 Carrier Grade Edition C.1.14. Changes in MySQL 5.1.15 (25 January 2007) C.1.15. Changes in MySQL 5.1.15 Carrier Grade Edition C.1.16. Changes in MySQL 5.1.14 (05 December 2006) C.1.17. Changes in MySQL 5.1.14 Carrier Grade Edition C.1.18. Changes in MySQL 5.1.13 (Not released) C.1.19. Changes in MySQL 5.1.12 (24 October 2006) C.1.20. Changes in MySQL 5.1.11 (26 May 2006) C.1.21. Changes in MySQL 5.1.10 (Not released) C.1.22. Changes in MySQL 5.1.9 (12 April 2006) C.1.23. Changes in MySQL 5.1.8 (Not released) C.1.24. Changes in MySQL 5.1.7 (27 February 2006) C.1.25. Changes in MySQL 5.1.6 (01 February 2006) C.1.26. Changes in MySQL 5.1.5 (10 January 2006) C.1.27. Changes in MySQL 5.1.4 (21 December 2005) C.1.28. Changes in MySQL 5.1.3 (29 November 2005) C.1.29. Changes in MySQL 5.1.2 (Not released) C.1.30. Changes in MySQL 5.1.1 (Not released) C.2. MySQL Connector/ODBC (MyODBC) Change History [+/-] C.2.1. Changes in MySQL Connector/ODBC 5.1.2 (Not yet released) C.2.2. Changes in MySQL Connector/ODBC 5.1.1 (13 December 2007) C.2.3. Changes in MySQL Connector/ODBC 5.1.0 (10 September 2007) C.2.4. Changes in MySQL Connector/ODBC 5.0.12 (Never released) C.2.5. Changes in MySQL Connector/ODBC 5.0.11 (31 January 2007) C.2.6. Changes in MySQL Connector/ODBC 5.0.10 (14 December 2006) C.2.7. Changes in MySQL Connector/ODBC 5.0.9 (22 November 2006) C.2.8. Changes in MySQL Connector/ODBC 5.0.8 (17 November 2006) C.2.9. Changes in MySQL Connector/ODBC 5.0.7 (08 November 2006) C.2.10. Changes in MySQL Connector/ODBC 5.0.6 (03 November 2006) C.2.11. Changes in MySQL Connector/ODBC 5.0.5 (17 October 2006) C.2.12. Changes in Connector/ODBC 5.0.3 (Connector/ODBC 5.0 Alpha 3) (20 June 2006) C.2.13. Changes in Connector/ODBC 5.0.2 (Never released) C.2.14. Changes in Connector/ODBC 5.0.1 (Connector/ODBC 5.0 Alpha 2) (05 June 2006) C.2.15. Changes in MySQL Connector/ODBC 3.51.23 (Not yet released) C.2.16. Changes in MySQL Connector/ODBC 3.51.22 (13 November 2007) C.2.17. Changes in MySQL Connector/ODBC 3.51.21 (08 October 2007) C.2.18. Changes in MySQL Connector/ODBC 3.51.20 (10 September 2007) C.2.19. Changes in MySQL Connector/ODBC 3.51.19 (10 August 2007) C.2.20. Changes in MySQL Connector/ODBC 3.51.18 (08 August 2007) C.2.21. Changes in MySQL Connector/ODBC 3.51.17 (14 July 2007) C.2.22. Changes in MySQL Connector/ODBC 3.51.16 (14 June 2007) C.2.23. Changes in MySQL Connector/ODBC 3.51.15 (7 May 2007) C.2.24. Changes in MySQL Connector/ODBC 3.51.14 (08 March 2007) C.2.25. Changes in MySQL Connector/ODBC 3.51.13 (Never released) C.2.26. Changes in MySQL Connector/ODBC 3.51.12 (11 Febrauary 2005) C.2.27. Changes in MySQL Connector/ODBC 3.51.11 (28 January 2005) C.3. MySQL Connector/NET Change History [+/-] C.3.1. Changes in MySQL Connector/NET 5.2.0 (Not yet released) C.3.2. Changes in MySQL Connector/NET 5.1.4 (20 November 2007) C.3.3. Changes in MySQL Connector/NET 5.1.3 (21 September 2007) C.3.4. Changes in MySQL Connector/NET 5.1.2 (18 June 2007) C.3.5. Changes in MySQL Connector/NET 5.1.1 (23 May 2007) C.3.6. Changes in MySQL Connector/NET 5.1.0 (01 May 2007) C.3.7. Changes in MySQL Connector/NET 5.0.9 (Not yet released) C.3.8. Changes in MySQL Connector/NET 5.0.8 (21 August 2007) C.3.9. Changes in MySQL Connector/NET 5.0.7 (18 May 2007) C.3.10. Changes in MySQL Connector/NET 5.0.6 (22 March 2007) C.3.11. Changes in MySQL Connector/NET 5.0.5 (07 March 2007) C.3.12. Changes in MySQL Connector/NET 5.0.4 (Not released) C.3.13. Changes in MySQL Connector/NET 5.0.3 (05 January 2007) C.3.14. Changes in MySQL Connector/NET 5.0.2 (06 November 2006) C.3.15. Changes in MySQL Connector/NET 5.0.1 (01 October 2006) C.3.16. Changes in MySQL Connector/NET 5.0.0 (08 August 2006) C.3.17. Changes in MySQL Connector/NET 1.0.11 (Not yet released) C.3.18. Changes in MySQL Connector/NET 1.0.10 (24 August 2007) C.3.19. Changes in MySQL Connector/NET 1.0.9 (02 February 2007) C.3.20. Changes in MySQL Connector/NET 1.0.8 (20 October 2006) C.3.21. Changes in MySQL Connector/NET 1.0.7 (21 November 2005) C.3.22. Changes in MySQL Connector/NET 1.0.6 (03 October 2005) C.3.23. Changes in MySQL Connector/NET 1.0.5 (29 August 2005) C.3.24. Changes in MySQL Connector/NET 1.0.4 (20 January 2005) C.3.25. Changes in MySQL Connector/NET 1.0.3 (12 October 2004) C.3.26. Changes in MySQL Connector/NET 1.0.2 (15 November 2004) C.3.27. Changes in MySQL Connector/NET 1.0.1 (27 October 2004) C.3.28. Changes in MySQL Connector/NET 1.0.0 (01 September 2004) C.3.29. Changes in MySQL Connector/NET Version 0.9.0 (30 August 2004) C.3.30. Changes in MySQL Connector/NET Version 0.76 C.3.31. Changes in MySQL Connector/NET Version 0.75 C.3.32. Changes in MySQL Connector/NET Version 0.74 C.3.33. Changes in MySQL Connector/NET Version 0.71 C.3.34. Changes in MySQL Connector/NET Version 0.70 C.3.35. Changes in MySQL Connector/NET Version 0.68 C.3.36. Changes in MySQL Connector/NET Version 0.65 C.3.37. Changes in MySQL Connector/NET Version 0.60 C.3.38. Changes in MySQL Connector/NET Version 0.50 C.4. MySQL Visual Studio Plugin Change History [+/-] C.4.1. Changes in MySQL Visual Studio Plugin 1.0.3 (Not yet released) C.4.2. Changes in MySQL Visual Studio Plugin 1.0.2 (Not yet released) C.4.3. Changes in MySQL Visual Studio Plugin 1.0.1 (4 October 2006) C.4.4. Changes in MySQL Visual Studio Plugin 1.0.0 (4 October 2006) C.5. MySQL Connector/J Change History [+/-] C.5.1. Changes in MySQL Connector/J 5.1.x C.5.2. Changes in MySQL Connector/J 5.0.x C.5.3. Changes in MySQL Connector/J 3.1.x C.5.4. Changes in MySQL Connector/J 3.0.x C.5.5. Changes in MySQL Connector/J 2.0.x C.5.6. Changes in MySQL Connector/J 1.2b (04 July 1999) C.5.7. Changes in MySQL Connector/J 1.2.x and lower C.6. MySQL Connector/MXJ Change History [+/-] C.6.1. Changes in MySQL Connector/MXJ 5.0.6 (04 May 2007) C.6.2. Changes in MySQL Connector/MXJ 5.0.5 (14 March 2007) C.6.3. Changes in MySQL Connector/MXJ 5.0.4 (28 January 2007) C.6.4. Changes in MySQL Connector/MXJ 5.0.3 (24 June 2006) C.6.5. Changes in MySQL Connector/MXJ 5.0.2 (15 June 2006) C.6.6. Changes in MySQL Connector/MXJ 5.0.1 (Never released) C.6.7. Changes in MySQL Connector/MXJ 5.0.0 (09 December 2005) C.7. MySQL Proxy Change History [+/-] C.7.1. Changes in MySQL Proxy 0.6.0 (Not yet released) C.7.2. Changes in MySQL Proxy 0.5.1 (30 June 2007) C.7.3. Changes in MySQL Proxy 0.5.0 (19 June 2007)
D. Limits and Restrictions [+/-]
D.1. Restrictions on Stored Routines and Triggers D.2. Restrictions on Server-Side Cursors D.3. Restrictions on Subqueries D.4. Restrictions on Views D.5. Restrictions on XA Transactions D.6. Restrictions on Character Sets D.7. Limits in MySQL [+/-] D.7.1. Limits of Joins D.7.2. The Maximum Number of Columns Per Table D.7.3. Windows Platform Limitations
E. Credits [+/-]
E.1. Developers at MySQL AB E.2. Contributors to MySQL E.3. Documenters and translators E.4. Libraries used by and included with MySQL E.5. Packages that support MySQL E.6. Tools that were used to create MySQL E.7. Supporters of MySQL
Index
List of Figures
12.1. The MySQL architecture using pluggable storage engines
12.2. FEDERATED table structure
13.1. DRBD Architecture
13.2. DRBD Architecture
13.3. DRBD Architecture
14.1. Using replication to improve the performance during scaleout
14.2. Using replication to replicate separate DBs to multiple hosts
14.3. Using an additional replication host to improve performance
14.4. Redundancy using replication, initial structure
14.5. Redundancy using replication, after master failure
A.1. Active-Master MySQL server
List of Tables
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. mysqlimport Option Reference
4.8. mysqlslap Option Reference
4.9. myisamchk Option Reference
4.10. mysqlaccess Option Reference
4.11. mysqlbinlog Option Reference
4.12. mysqlhotcopy Option Reference
4.13. mysql_tableinfo Option Reference
25.1. Mapping of MySQL Error Numbers to SQLStates
List of Examples
25.1. Obtaining a connection from the DriverManager
25.2. Using java.sql.Statement to execute a SELECT query
25.3. Stored Procedures
25.4. Using Connection.prepareCall()
25.5. Registering output parameters
25.6. Setting CallableStatement input parameters
25.7. Retrieving results and output parameter values
25.8. Retrieving AUTO_INCREMENT column values using Statement.getGeneratedKeys()
25.9. Retrieving AUTO_INCREMENT column values using SELECT LAST_INSERT_ID()
25.10. Retrieving AUTO_INCREMENT column values in Updatable ResultSets
25.11. Using a connection pool with a J2EE application server
25.12. Example of transaction with retry logic
MySQL 5.1参考手册
这是MySQL参考手册的翻译版本,关于MySQL参考手册,请访问dev.mysql.com。 原始参考手册为英文版,与英文版参考手册相比,本翻译版可能不是最新的。
This translation was done by MySQL partner GreatLinux, Beijing, People's Republic of China. GreatLinux Inc. 北京万里开源软件有限公司在全国范围提供MySQL产品相关的商务及 技术方面的咨询与支持服务。垂询请致电:8610-65694500,或发送邮件至:sales@greatlinux.com .
摘要
这是MySQL参考手册 它涉及MySQL 5.1至5.1.2-alpha版本。
文档生成于: 2005-11-15
--------------------------------------------------------------------------------
目录
前言
1. 一般信息
1.1. 关于本手册
1.2. 本手册采用的惯例
1.3. MySQL AB概述
1.4. MySQL数据库管理系统概述
1.4.1. MySQL的历史
1.4.2. MySQL的的主要特性
1.4.3. MySQL稳定性
1.4.4. MySQL表最大能达到多少
1.4.5. 2000年兼容性
1.5. MaxDB数据库管理系统概述
1.5.1. 什么是MaxDB?
1.5.2. MaxDB的历史
1.5.3. MaxDB的特性
1.5.4. 许可和支持
1.5.5. MaxDB和MySQL之间的特性差异
1.5.6. MaxDB和MySQL之间的协同性
1.5.7. 与MaxDB有关的链接
1.6. MySQL发展大事记
1.6.1. MySQL 5.1的新特性
1.7. MySQL信息源
1.7.1. MySQL邮件列表
1.7.2. IRC(在线聊天系统)上的MySQL社区支持
1.7.3. MySQL论坛上的MySQL社区支持
1.8. MySQL标准的兼容性
1.8.1. MySQL遵从的标准是什么
1.8.2. 选择SQL模式
1.8.3. 在ANSI模式下运行MySQL
1.8.4. MySQL对标准SQL的扩展
1.8.5. MySQL与标准SQL的差别
1.8.6. MySQL处理约束的方式
2. 安装MySQL
2.1. 一般安装问题
2.1.1. MySQL支持的操作系统
2.1.2. 选择要安装的MySQL分发版
2.1.3. 怎样获得MySQL
2.1.4. 通过MD5校验和或GnuPG验证软件包的完整性
2.1.5. 安装布局
2.2. 使用二进制分发版的标准MySQL安装
2.3. 在Windows上安装MySQL
2.3.1. Windows系统要求
2.3.2. 选择安装软件包
2.3.3. 用自动安装器安装MySQL
2.3.4. 使用MySQL安装向导
2.3.5. 使用配置向导
2.3.6. 通过非安装Zip文件安装MySQL
2.3.7. 提取安装档案文件
2.3.8. 创建选项文件
2.3.9. 选择MySQL服务器类型
2.3.10. 首次启动服务器
2.3.11. 从Windows命令行启动MySQL
2.3.12. 以Windows服务方式启动MySQL
2.3.13. 测试MySQL安装
2.3.14. 在Windows环境下对MySQL安装的故障诊断与排除
2.3.15. 在Windows下升级MySQL
2.3.16. Windows版MySQL同Unix版MySQL对比
2.4. 在Linux下安装MySQL
2.5.在Mac OS X中安装MySQL
2.6. 在NetWare中安装MySQL
2.7. 在其它类Unix系统中安装MySQL
2.8. 使用源码分发版安装MySQL
2.8.1. 源码安装概述
2.8.2. 典型配置选项
2.8.3. 从开发源码树安装
2.8.4. 处理MySQL编译问题
2.8.5. MIT-pthreads注意事项
2.8.6. 在Windows下从源码安装MySQL
2.8.7. 在Windows下编译MySQL客户端
2.9. 安装后的设置和测试
2.9.1. Windows下安装后的过程
2.9.2. Unix下安装后的过程
2.9.3. 使初始MySQL账户安全
2.10. 升级MySQL
2.10.1. 从5.0版升级
2.10.2. 升级授权表
2.10.3. 将MySQL数据库拷贝到另一台机器
2.11. 降级MySQL
2.12. 具体操作系统相关的注意事项
2.12.1. Linux注意事项
2.12.2. Mac OS X注意事项
2.12.3. Solaris注意事项
2.12.4. BSD注意事项
2.12.5. 其它Unix注意事项
2.12.6. OS/2注意事项
2.13. Perl安装注意事项
2.13.1. 在Unix中安装Perl
2.13.2. 在Windows下安装ActiveState Perl
2.13.3. 使用Perl DBI/DBD接口的问题3. 教程
3.1. 连接与断开服务器
3.2. 输入查询
3.3. 创建并使用数据库
3.3.1. 创建并选择数据库
3.3.2. 创建表
3.3.3. 将数据装入表中
3.3.4. 从表检索信息
3.4. 获得数据库和表的信息
3.5. 在批处理模式下使用mysql
3.6. 常用查询的例子
3.6.1. 列的最大值
3.6.2. 拥有某个列的最大值的行
3.6.3. 列的最大值:按组
3.6.4. 拥有某个字段的组间最大值的行
3.6.5. 使用用户变量
3.6.6. 使用外键
3.6.7. 根据两个键搜索
3.6.8. 根据天计算访问量
3.6.9. 使用AUTO_INCREMENT
3.7. 孪生项目的查询
3.7.1. 查找所有未分发的孪生项
3.7.2. 显示孪生对状态的表
3.8. 与Apache一起使用MySQL
4. MySQL程序概述
4.1. MySQL程序概述
4.2. 调用MySQL程序
4.3. 指定程序选项
4.3.1. 在命令行上使用选项
4.3.2. 使用选项文件
4.3.3. 用环境变量指定选项
4.3.4. 使用选项设置程序变量
5. 数据库管理
5.1. MySQL服务器和服务器启动脚本
5.1.1. 服务器端脚本和实用工具概述
5.1.2. mysqld-max扩展MySQL服务器
5.1.3. mysqld_safe:MySQL服务器启动脚本
5.1.4. mysql.server:MySQL服务器启动脚本
5.1.5. mysqld_multi:管理多个MySQL服务器的程序
5.2. mysqlmanager:MySQL实例管理器
5.2.1. 用MySQL实例管理器启动MySQL服务器
5.2.2. 连接到MySQL实例管理器并创建用户账户
5.2.3. MySQL实例管理器命令行选项
5.2.4. MySQL实例管理器配置文件
5.2.5. MySQL实例管理器识别的命令
5.3. mysqld:MySQL服务器
5.3.1. mysqld命令行选项
5.3.2. SQL服务器模式
5.3.3. 服务器系统变量
5.3.4. 服务器状态变量
5.4. mysql_fix_privilege_tables:升级MySQL系统表
5.5. MySQL服务器关机进程
5.6. 一般安全问题
5.6.1. 通用安全指南
5.6.2. 使MySQL在攻击者面前保持安全
5.6.3. Mysqld安全相关启动选项
5.6.4. LOAD DATA LOCAL安全问题5.7. MySQL访问权限系统
5.7.1. 权限系统的作用
5.7.2. 权限系统工作原理
5.7.3. MySQL提供的权限
5.7.4. 与MySQL服务器连接
5.7.5. 访问控制, 阶段1:连接核实
5.7.6. 访问控制, 阶段2:请求核实
5.7.7. 权限更改何时生效
5.7.8. 拒绝访问错误的原因
5.7.9. MySQL 4.1中的密码哈希处理
5.8. MySQL用户账户管理
5.8.1. MySQL用户名和密码
5.8.2. 向MySQL增加新用户账户
5.8.3. 从MySQL删除用户账户
5.8.4. 限制账户资源
5.8.5. 设置账户密码
5.8.6. 使你的密码安全
5.8.7. 使用安全连接
5.9. 备份与恢复
5.9.1. 数据库备份
5.9.2. 示例用备份与恢复策略
5.9.3. 自动恢复
5.9.4. 表维护和崩溃恢复
5.9.5. myisamchk:MyISAM表维护实用工具
5.9.6. 建立表维护计划
5.9.7. 获取关于表的信息
5.10. MySQL本地化和国际应用
5.10.1. 数据和排序用字符集
5.10.2. 设置错误消息语言
5.10.3. 添加新的字符集
5.10.4. 字符定义数组
5.10.5. 字符串比较支持
5.10.6. 多字节字符支持
5.10.7. 字符集问题
5.10.8. MySQL服务器时区支持
5.11. MySQL日志文件
5.11.1. 错误日志
5.11.2. 通用查询日志
5.11.3. 二进制日志
5.11.4. 慢速查询日志
5.11.5. 日志文件维护
5.12. 在同一台机器上运行多个MySQL服务器
5.12.1. 在Windows下运行多个服务器
5.12.2. 在Unix中运行多个服务器
5.12.3. 在多服务器环境中使用客户端程序
5.13. MySQL查询高速缓冲
5.13.1. 查询高速缓冲如何工作
5.13.2. 查询高速缓冲SELECT选项
5.13.3. 查询高速缓冲配置
5.13.4. 查询高速缓冲状态和维护
6. MySQL中的复制
6.1. 复制介绍
6.2. 复制实施概述
6.3. 复制实施细节
6.3.1. 复制主线程状态
6.3.2. 复制从I/O线程状态
6.3.3. 复制从SQL线程状态
6.3.4. 复制传递和状态文件
6.4. 如何设置复制
6.5. 不同MySQL版本之间的复制兼容性
6.6. 升级复制设置
6.6.1. 将复制升级到5.0版
6.7. 复制特性和已知问题
6.8. 复制启动选项
6.9. 复制FAQ
6.10. 复制故障诊断与排除
6.11. 通报复制缺陷
6.12. 多服务器复制中的Auto-Increment
7. 优化
7.1. 优化概述
7.1.1. MySQL设计局限与折衷
7.1.2. 为可移植性设计应用程序
7.1.3. 我们已将MySQL用在何处?
7.1.4. MySQL基准套件
7.1.5. 使用自己的基准
7.2. 优化SELECT语句和其它查询
7.2.1. EXPLAIN语法(获取SELECT相关信息)
7.2.2. 估计查询性能
7.2.3. SELECT查询的速度
7.2.4. MySQL怎样优化WHERE子句
7.2.5. 范围优化
7.2.6. 索引合并优化
7.2.7. MySQL如何优化IS NULL
7.2.8. MySQL如何优化DISTINCT
7.2.9. MySQL如何优化LEFT JOIN和RIGHT JOIN
7.2.10. MySQL如何优化嵌套Join
7.2.11. MySQL如何简化外部联合
7.2.12. MySQL如何优化ORDER BY
7.2.13. MySQL如何优化GROUP BY
7.2.14. MySQL如何优化LIMIT
7.2.15. 如何避免表扫描
7.2.16. INSERT语句的速度
7.2.17. UPDATE语句的速度
7.2.18. DELETE语句的速度
7.2.19. 其它优化技巧
7.3. 锁定事宜
7.3.1. 锁定方法
7.3.2. 表锁定事宜
7.4. 优化数据库结构
7.4.1. 设计选择
7.4.2. 使你的数据尽可能小
7.4.3. 列索引
7.4.4. 多列索引
7.4.5. MySQL如何使用索引
7.4.6. MyISAM键高速缓冲
7.4.7. MyISAM索引统计集合
7.4.8. MySQL如何计算打开的表
7.4.9. MySQL如何打开和关闭表
7.4.10. 在同一个数据库中创建多个表的缺陷
7.5. 优化MySQL服务器
7.5.1. 系统因素和启动参数的调节
7.5.2. 调节服务器参数
7.5.3. 控制查询优化器的性能
7.5.4. 编译和链接怎样影响MySQL的速度
7.5.5. MySQL如何使用内存
7.5.6. MySQL如何使用DNS
7.6. 磁盘事宜
7.6.1. 使用符号链接
8. 客户端和实用工具程序
8.1. 客户端脚本和实用工具概述
8.2. myisampack:生成压缩、只读MyISAM表
8.3. mysql:MySQL命令行工具
8.3.1. 选项
8.3.2. mysql命令
8.3.3. 怎样从文本文件执行SQL语句
8.3.4. mysql技巧
8.4. mysqlaccess:用于检查访问权限的客户端
8.5. mysqladmin:用于管理MySQL服务器的客户端
8.6. mysqlbinlog:用于处理二进制日志文件的实用工具
8.7. mysqlcheck:表维护和维修程序
8.8. mysqldump:数据库备份程序
8.9. mysqlhotcopy:数据库备份程序
8.10. mysqlimport:数据导入程序
8.11. mysqlshow-显示数据库、表和列信息
8.12. myisamlog:显示MyISAM日志文件内容
8.13. perror:解释错误代码
8.14. replace:字符串替换实用工具
8.15. mysql_zap:杀死符合某一模式的进程
9. 语言结构
9.1. 文字值
9.1.1. 字符串
9.1.2. 数值
9.1.3. 十六进制值
9.1.4. 布尔值
9.1.5. 位字段值
9.1.6. NULL值
9.2. 数据库、表、索引、列和别名
9.2.1. 识别符限制条件
9.2.2. 识别符大小写敏感性
9.3. 用户变量
9.4. 系统变量
9.4.1. 结构式系统变量
9.5. 注释语法
9.6. MySQL中保留字的处理
10. 字符集支持
10.1. 常规字符集和校对
10.2. MySQL中的字符集和校对
10.3. 确定默认字符集和校对
10.3.1. 服务器字符集和校对
10.3.2. 数据库字符集和校对
10.3.3. 表字符集和校对
10.3.4. 列字符集和校对
10.3.5. 字符集和校对分配示例
10.3.6. 连接字符集和校对
10.3.7. 字符串文字字符集和校对
10.3.8. 在SQL语句中使用COLLATE
10.3.9. COLLATE子句优先
10.3.10. BINARY操作符
10.3.11. 校对确定较为复杂的一些特殊情况
10.3.12. 校对必须适合字符集
10.3.13. 校对效果的示例
10.4. 字符集支持影响到的操作
10.4.1. 结果字符串
10.4.2. CONVERT()
10.4.3. CAST()
10.4.4. SHOW语句
10.5. Unicode支持
10.6. 用于元数据的UTF8
10.7. 与其它DBMS的兼容性
10.8. 新字符集配置文件格式
10.9. 国家特有字符集
10.10. MySQL支持的字符集和校对
10.10.1. Unicode字符集
10.10.2. 西欧字符集
10.10.3. 中欧字符集
10.10.4. 南欧与中东字符集
10.10.5. 波罗的海字符集
10.10.6. 西里尔字符集
10.10.7. 亚洲字符集
11. 列类型
11.1. 列类型概述
11.1.1. 数值类型概述
11.1.2. 日期和时间类型概述
11.1.3. 字符串类型概述
11.2. 数值类型
11.3. 日期和时间类型
11.3.1. DATETIME、DATE和TIMESTAMP类型
11.3.2. TIME类型
11.3.3. YEAR类型
11.3.4. Y2K事宜和日期类型
11.4. String类型
11.4.1. CHAR和VARCHAR类型
11.4.2. BINARY和VARBINARY类型
11.4.3. BLOB和TEXT类型
11.4.4. ENUM类型
11.4.5. SET类型
11.5. 列类型存储需求
11.6. 选择正确的列类型
11.7. 使用来自其他数据库引擎的列类型
12. 函数和操作符
12.1. 操作符
12.1.1. 操作符优先级
12.1.2. 圆括号
12.1.3. 比较函数和操作符
12.1.4. 逻辑操作符
12.2. 控制流程函数
12.3. 字符串函数
12.3.1. 字符串比较函数
12.4. 数值函数
12.4.1. 算术操作符
12.4.2. 数学函数
12.5. 日期和时间函数
12.6. MySQL使用什么日历?
12.7. 全文搜索功能
12.7.1. 布尔全文搜索
12.7.2. 全文搜索带查询扩展
12.7.3. 全文停止字
12.7.4. 全文限定条件
12.7.5. 微调MySQL全文搜索
12.8. Cast函数和操作符
12.9. 其他函数
12.9.1. 位函数
12.9.2. 加密函数
12.9.3. 信息函数
12.9.4. 其他函数
12.10. 与GROUP BY子句同时使用的函数和修改程序
12.10.1. GROUP BY(聚合)函数
12.10.2. GROUP BY修改程序
12.10.3. 具有隐含字段的GROUP BY
13. SQL语句语法
13.1. 数据定义语句
13.1.1. ALTER DATABASE语法
13.1.2. ALTER TABLE语法
13.1.3. CREATE DATABASE语法
13.1.4. CREATE INDEX语法
13.1.5. CREATE TABLE语法
13.1.6. DROP DATABASE语法
13.1.7. DROP INDEX语法
13.1.8. DROP TABLE语法
13.1.9. RENAME TABLE语法
13.2. 数据操作语句
13.2.1. DELETE语法
13.2.2. DO语法
13.2.3. HANDLER语法
13.2.4. INSERT语法
13.2.5. LOAD DATA INFILE语法
13.2.6. REPLACE语法
13.2.7. SELECT语法
13.2.8. Subquery语法
13.2.9. TRUNCATE语法
13.2.10. UPDATE语法
13.3. MySQL实用工具语句
13.3.1. DESCRIBE语法(获取有关列的信息)
13.3.2. USE语法
13.4. MySQL事务处理和锁定语句
13.4.1. START TRANSACTION, COMMIT和ROLLBACK语法
13.4.2. 不能回滚的语句
13.4.3. 会造成隐式提交的语句
13.4.4. SAVEPOINT和ROLLBACK TO SAVEPOINT语法
13.4.5. LOCK TABLES和UNLOCK TABLES语法
13.4.6. SET TRANSACTION语法
13.4.7. XA事务
13.5. 数据库管理语句
13.5.1. 账户管理语句
13.5.2. 表维护语句
13.5.3. SET语法
13.5.4. SHOW语法
13.5.5. 其它管理语句
13.6. 复制语句
13.6.1. 用于控制主服务器的SQL语句
13.6.2. 用于控制从服务器的SQL语句
13.7. 用于预处理语句的SQL语法
14. 插件式存储引擎体系结构
14.1. 前言
14.2. 概述
14.3. 公共MySQL数据库服务器层
14.4. 选择存储引擎
14.5. 将存储引擎指定给表
14.6. 存储引擎和事务
14.7. 插入存储引擎
14.8. 拔出存储引擎
14.9. 插件式存储器的安全含义
15. 存储引擎和表类型
15.1. MyISAM存储引擎
15.1.1. MyISAM启动选项
15.1.2. 键所需的空间
15.1.3. MyISAM表的存储格式
15.1.4. MyISAM表方面的问题
15.2. InnoDB存储引擎
15.2.1. InnoDB概述
15.2.2. InnoDB联系信息
15.2.3. InnoDB配置
15.2.4. InnoDB启动选项
15.2.5. 创建InnoDB表空间
15.2.6. 创建InnoDB表
15.2.7. 添加和删除InnoDB数据和日志文件
15.2.8. InnoDB数据库的备份和恢复
15.2.9. 将InnoDB数据库移到另一台机器上
15.2.10. InnoDB事务模型和锁定
15.2.11. InnoDB性能调节提示
15.2.12. 多版本的实施
15.2.13. 表和索引结构
15.2.14. 文件空间管理和磁盘I/O
15.2.15. InnoDB错误处理
15.2.16. 对InnoDB表的限制
15.2.17. InnoDB故障诊断与排除
15.3. MERGE存储引擎
15.3.1. MERGE表方面的问题
15.4. MEMORY (HEAP)存储引擎
15.5. BDB (BerkeleyDB)存储引擎
15.5.1. BDB支持的操作系统
15.5.2. 安装BDB
15.5.3. BDB启动选项
15.5.4. BDB表的特性
15.5.5. 修改BDB所需的事宜
15.5.6. 对BDB表的限制
15.5.7. 使用BDB表时可能出现的错误15.6. EXAMPLE存储引擎
15.7. FEDERATED存储引擎
15.7.1. 安装FEDERATED存储引擎
15.7.2. FEDERATED存储引擎介绍
15.7.3. 如何使用FEDERATED表
15.7.4. FEDERATED存储引擎的局限性15.8. ARCHIVE存储引擎
15.9. CSV存储引擎
15.10. BLACKHOLE存储引擎
16. 编写自定义存储引擎
16.1. 前言
16.2. 概述
16.3. 创建存储引擎源文件
16.4. 创建handlerton
16.5. 对处理程序进行实例化处理
16.6. 定义表扩展
16.7. 创建表
16.8. 打开表
16.9. 实施基本的表扫描功能
16.9.1. 实施store_lock()函数
16.9.2. 实施external_lock()函数
16.9.3. 实施rnd_init()函数
16.9.4. 实施info()函数
16.9.5. 实施extra()函数
16.9.6. 实施rnd_next()函数16.10. 关闭表
16.11. 为存储引擎添加对INSERT的支持
16.12. 为存储引擎添加对UPDATE的支持
16.13. 为存储引擎添加对DELETE的支持
16.14. API引用
16.14.1. bas_ext
16.14.2. close
16.14.3. create
16.14.4. delete_row
16.14.5. delete_table
16.14.6. external_lock
16.14.7. extra
16.14.8. info
16.14.9. open
16.14.10. rnd_init
16.14.11. rnd_next
16.14.12. store_lock
16.14.13. update_row
16.14.14. write_row
17. MySQL簇
17.1. MySQL簇概述
17.2. MySQL簇的基本概念
17.3. 多计算机的简单基础知识
17.3.1. 硬件、软件和联网
17.3.2. 安装
17.3.3. 配置
17.3.4. 首次启动
17.3.5. 加载示例数据并执行查询
17.3.6. 安全关闭和重启
17.4. MySQL簇的配置
17.4.1. 从源码创建MySQL簇
17.4.2. 安装软件
17.4.3. MySQL簇的快速测试设置
17.4.4. 配置文件
17.5. MySQL簇中的进程管理
17.5.1. 用于MySQL簇的MySQL服务器进程使用
17.5.2. ndbd,存储引擎节点进程
17.5.3. ndb_mgmd,“管理服务器”进程
17.5.4. ndb_mgm,“管理客户端”进程
17.5.5. 用于MySQL簇进程的命令选项
17.6. MySQL簇的管理
17.6.1. MySQL簇的启动阶段
17.6.2. “管理客户端”中的命令
17.6.3. MySQL簇中生成的事件报告
17.6.4. 单用户模式
17.6.5. MySQL簇的联机备份
17.7. 使用与MySQL簇的高速互连
17.7.1. 配置MySQL簇以使用SCI套接字
17.7.2. 理解簇互连的影响
17.8. MySQL簇的已知限制
17.9. MySQL簇发展的重要历程
17.9.1. MySQL 5.0中的MySQL簇变化
17.9.2. 关于MySQL簇的MySQL 5.1发展历程
17.10. MySQL簇常见问题解答
17.11. MySQL簇术语表
18. 分区
18.1. MySQL中的分区概述
18.2. 分区类型
18.2.1. RANGE分区
18.2.2. LIST分区
18.2.3. HASH分区
18.2.4. KEY分区
18.2.5. 子分区
18.2.6. MySQL分区处理NULL值的方式18.3. 分区管理
18.3.1. RANGE和LIST分区的管理
18.3.2. HASH和KEY分区的管理
18.3.3. 分区维护
18.3.4. 获取关于分区的信息
19. MySQL中的空间扩展
19.1. 前言
19.2. OpenGIS几何模型
19.2.1. Geometry类的层次
19.2.2. 类Geometry
19.2.3. 类Point
19.2.4. 类Curve
19.2.5. 类LineString
19.2.6. 类Surface
19.2.7. 类Polygon
19.2.8. 类GeometryCollection
19.2.9. 类MultiPoint
19.2.10. 类MultiCurve
19.2.11. 类MultiLineString
19.2.12. 类MultiSurface
19.2.13. 类MultiPolygon
19.3. 支持的空间数据格式
19.3.1. 著名的文本(WKT)格式
19.3.2. 著名的二进制(WKB)格式
19.4. 创建具备空间功能的MySQL数据库
19.4.1. MySQL空间数据类型
19.4.2. 创建空间值
19.4.3. 创建空间列
19.4.4. 填充空间列
19.4.5. 获取空间数据
19.5. 分析空间信息
19.5.1. Geometry格式转换函数
19.5.2. Geometry函数
19.5.3. 从已有Geometry创建新Geometry的函数
19.5.4. 测试几何对象间空间关系的函数
19.5.5. 关于几何最小边界矩形(MBR)的关系
19.5.6. 测试几何类之间空间关系的函数
19.6. 优化空间分析
19.6.1. 创建空间索引
19.6.2. 使用空间索引
19.7. MySQL的一致性和兼容性
19.7.1. 尚未实施的GIS特性
20. 存储程序和函数
20.1. 存储程序和授权表
20.2. 存储程序的语法
20.2.1. CREATE PROCEDURE和CREATE FUNCTION
20.2.2. ALTER PROCEDURE和ALTER FUNCTION
20.2.3. DROP PROCEDURE和DROP FUNCTION
20.2.4. SHOW CREATE PROCEDURE和SHOW CREATE FUNCTION
20.2.5. SHOW PROCEDURE STATUS和SHOW FUNCTION STATUS
20.2.6. CALL语句
20.2.7. BEGIN ... END复合语句
20.2.8. DECLARE语句
20.2.9. 存储程序中的变量
20.2.10. 条件和处理程序
20.2.11. 光标
20.2.12. 流程控制构造
20.3. 存储程序、函数、触发程序和复制:常见问题
20.4. 存储子程序和触发程序的二进制日志功能
21. 触发程序
21.1. CREATE TRIGGER语法
21.2. DROP TRIGGER语法
21.3. 使用触发程序
22. 视图
22.1. ALTER VIEW语法
22.2. CREATE VIEW语法
22.3. DROP VIEW语法
22.4. SHOW CREATE VIEW语法
23. INFORMATION_SCHEMA信息数据库
23.1. INFORMATION_SCHEMA表
23.1.1. INFORMATION_SCHEMA SCHEMATA表
23.1.2. INFORMATION_SCHEMA TABLES表
23.1.3. INFORMATION_SCHEMA COLUMNS表
23.1.4. INFORMATION_SCHEMA STATISTICS表
23.1.5. INFORMATION_SCHEMA USER_PRIVILEGES表
23.1.6. INFORMATION_SCHEMA SCHEMA_PRIVILEGES表
23.1.7. INFORMATION_SCHEMA TABLE_PRIVILEGES表
23.1.8. INFORMATION_SCHEMA COLUMN_PRIVILEGES表
23.1.9. INFORMATION_SCHEMA CHARACTER_SETS表
23.1.10. INFORMATION_SCHEMA COLLATIONS表
23.1.11. INFORMATION_SCHEMA COLLATION_CHARACTER_SET_APPLICABILITY表
23.1.12. INFORMATION_SCHEMA TABLE_CONSTRAINTS表
23.1.13. INFORMATION_SCHEMA KEY_COLUMN_USAGE表
23.1.14. INFORMATION_SCHEMA ROUTINES表
23.1.15. INFORMATION_SCHEMA VIEWS表
23.1.16. INFORMATION_SCHEMA TRIGGERS表
23.1.17. 其他INFORMATION_SCHEMA表
23.2. SHOW语句的扩展24. 精度数学
24.1. 数值的类型
24.2. DECIMAL数据类型更改
24.3. 表达式处理
24.4. 四舍五入
24.5. 精度数学示例
25. API和库
25.1. libmysqld,嵌入式MySQL服务器库
25.1.1. 嵌入式MySQL服务器库概述
25.1.2. 使用libmysqld编译程序
25.1.3. 使用嵌入式MySQL服务器时的限制
25.1.4. 与嵌入式服务器一起使用的选项
25.1.5. 嵌入式服务器中尚需完成的事项(TODO)
25.1.6. 嵌入式服务器示例
25.1.7. 嵌入式服务器的许可
25.2. MySQL C API
25.2.1. C API数据类型
25.2.2. C API函数概述
25.2.3. C API函数描述
25.2.4. C API预处理语句
25.2.5. C API预处理语句的数据类型
25.2.6. C API预处理语句函数概述
25.2.7. C API预处理语句函数描述
25.2.8. C API预处理语句方面的问题
25.2.9. 多查询执行的C API处理
25.2.10. 日期和时间值的C API处理
25.2.11. C API线程函数介绍
25.2.12. C API嵌入式服务器函数介绍
25.2.13. 使用C API时的常见问题
25.2.14. 创建客户端程序
25.2.15. 如何生成线程式客户端
25.3. MySQL PHP API
25.3.1. 使用MySQL和PHP的常见问题
25.4. MySQL Perl API
25.5. MySQL C++ API
25.5.1. Borland C++
25.6. MySQL Python API
25.7. MySQL Tcl API
25.8. MySQL Eiffel Wrapper
25.9. MySQL程序开发实用工具
25.9.1. msql2mysql:转换mSQL程序以用于MySQL
25.9.2. mysql_config:获取编译客户端的编译选项
26. 连接器
26.1. MySQL Connector/ODBC
26.1.1. MyODBC介绍
26.1.2. 关于ODBC和MyODBC的一般信息
26.1.3. 如何安装MyODBC
26.1.4. 在Windows平台上从二进制版本安装MyODBC
26.1.5. I在Unix平台上从二进制版本安装MyODBC
26.1.6. 在Windows平台上从源码版本安装MyODBC
26.1.7. 在Unix平台上从源码版本安装MyODBC
26.1.8. 从BitKeeper开发源码树安装MyODBC
26.1.9. MyODBC配置
26.1.10. 与MyODBC连接相关的事宜
26.1.11. MyODBC和Microsoft Access
26.1.12. MyODBC和Microsoft VBA及ASP
26.1.13. MyODBC和第三方ODBC工具
26.1.14. MyODBC通用功能
26.1.15. 基本的MyODBC应用步骤
26.1.16. MyODBC API引用
26.1.17. MyODBC数据类型
26.1.18. MyODBC错误代码
26.1.19. MyODBC与VB:ADO、DAO和RDO
26.1.20. MyODBC与Microsoft.NET
26.1.21. 感谢
26.2. MySQL Connector/NET
26.2.1. 前言
26.2.2. 下载并安装MySQL Connector/NET
26.2.3. Connector/NET体系结构
26.2.4. 使用MySQL Connector/NET
26.2.5. MySQL Connector/NET变更史
26.3. MySQL Connector/J
26.3.1. 基本的JDBC概念
26.3.2. 安装 Connector/J
26.3.3. JDBC引用
26.3.4. 与J2EE和其他Java框架一起使用 Connector/J
26.3.5. 诊断 Connector/J方面的问题
26.3.6. Changelog
26.4. MySQL Connector/MXJ
26.4.1. 前言
26.4.2. 支持平台:
26.4.3. Junit测试要求
26.4.4. 运行Junit测试
26.4.5. 作为JDBC驱动程序的一部分运行
26.4.6. 在Java对象中运行
26.4.7. MysqldResource API
26.4.8. 在JMX代理(custom)中运行
26.4.9. 部署在标准的JMX代理环境下 (JBoss)
26.4.10. 安装
27. 扩展MySQL
27.1. MySQL内部控件
27.1.1. MySQL线程
27.1.2. MySQL测试套件
27.2. 为MySQL添加新函数
27.2.1. 自定义函数接口的特性
27.2.2. CREATE FUNCTION/DROP FUNCTION语法
27.2.3. 添加新的自定义函数
27.2.4. 添加新的固有函数
27.3. 为MySQL添加新步骤
27.3.1. 步骤分析
27.3.2. 编写步骤
A. 问题和常见错误
A.1. 如何确定导致问题的原因
A.2. 使用MySQL程序时的常见错误
A.2.1. 拒绝访问
A.2.2. 无法连接到[local] MySQL服务器
A.2.3. 客户端不支持鉴定协议
A.2.4. 输入密码时出现密码错误
A.2.5. 主机的host_name被屏蔽
A.2.6. 连接数过多
A.2.7. 内存溢出
A.2.8. MySQL服务器不可用
A.2.9. 信息包过大
A.2.10. 通信错误和失效连接
A.2.11. 表已满
A.2.12. 无法创建文件/写入文件
A.2.13. 命令不同步
A.2.14. 忽略用户
A.2.15. 表tbl_name不存在
A.2.16. 无法初始化字符集
A.2.17. 文件未找到
A.3. 与安装有关的事宜
A.3.1. 与MySQL客户端库的链接问题
A.3.2. 如何以普通用户身份运行MySQL
A.3.3. 与文件许可有关的问题
A.4. 与管理有关的事宜
A.4.1. 如何复位根用户密码
A.4.2. 如果MySQL依然崩溃,应作些什么
A.4.3. MySQL处理磁盘满的方式
A.4.4. MySQL将临时文件储存在哪里
A.4.5. 如何保护或更改MySQL套接字文件/tmp/mysql.sock
A.4.6. 时区问题
A.5. 与查询有关的事宜
A.5.1. 搜索中的大小写敏感性
A.5.2. 使用DATE列方面的问题
A.5.3. 与NULL值有关的问题
A.5.4. 与列别名有关的问题
A.5.5. 非事务表回滚失败
A.5.6. 从相关表删除行
A.5.7. 解决与不匹配行有关的问题
A.5.8. 与浮点比较有关的问题
A.6. 与优化器有关的事宜
A.7. 与表定义有关的事宜
A.7.1. 与ALTER TABLE有关的问题
A.7.2. 如何更改表中的列顺序
A.7.3. TEMPORARY TABLE问题
A.8. MySQL中的已知事宜
A.8.1. MySQL中的打开事宜
B. 错误代码和消息
B.1. 服务器错误代码和消息
B.2. 客户端错误代码和消息
C. 感谢
C.1. MySQL AB处的开发人
C.2. MySQL贡献人
C.3. 资料员和译员
C.4. MySQL使用和包含的库
C.5. 支持MySQL的软件包
C.6. 用于创建MySQL的工具
C.7. MySQL支持人员
D. MySQL变更史
D.1. 5.1.x版中的变更情况(开发)
D.1.1. 5.1.2版中的变更情况(尚未发布)
D.1.2. 5.1.1版中的变更情况(尚未发布)
D.2. MyODBC的变更情况
D.2.1. MyODBC 3.51.12的变更情况
D.2.2. MyODBC 3.51.11的变更情况
E. 移植到其他系统
E.1. 调试MySQL服务器
E.1.1. 针对调试编译MySQL
E.1.2. 创建跟踪文件
E.1.3. 在gdb环境下调试mysqld
E.1.4. 使用堆栈跟踪
E.1.5. 使用日志文件找出mysqld中的错误原因
E.1.6. 如果出现表崩溃,请生成测试案例
E.2. 调试MySQL客户端
E.3. DBUG软件包
E.4. 关于RTS线程的注释
E.5. 线程软件包之间的差异
F. 环境变量
G. MySQL正则表达式
H. MySQL中的限制
H.1. 联合的限制
I. 特性限制
I.1. 对存储子程序和触发程序的限制
I.2. 对服务器端光标的限制
I.3. 对子查询的限制
I.4. 对视图的限制
I.5. 对XA事务的限制
J. GNU通用公共许可
K. MySQL FLOSS许可例外
索引
图形清单
14.1. MySQL插件式存储引擎的体系结构
14.2. 存储引擎比较
16.1. MySQL体系结构
表格清单
26.1. 连接属性
26.2. 转换表
26.3. 用于ResultSet.getObject()的MySQL类型和Java类型
26.4. MySQL对Java编码名称的翻译
示例清单
26.1. 从DriverManager获得连接
26.2. 使用java.sql.Statement执行SELECT查询
26.3. 存储程序示例
26.4. 使用Connection.prepareCall()
26.5. 注册输出参数
26.6. 设置CallableStatement输入参数
26.7. 检索结果和输出参数值
26.8. 使用Statement.getGeneratedKeys()检索AUTO_INCREMENT列的值
26.9. 使用SELECT LAST_INSERT_ID()检索AUTO_INCREMENT列的值
26.10. 在可更新的ResultSets中检索AUTO_INCREMENT列的值
26.11. 设置Unix环境下的CLASSPATH
26.12. 与J2EE应用服务器一起使用连接池
26.13. 重试逻辑的事务示例
--------------------------------------------------------------------------------
这是MySQL参考手册的翻译版本,关于MySQL参考手册,请访问dev.mysql.com。 原始参考手册为英文版,与英文版参考手册相比,本翻译版可能不是最新的。
MySQL 3.23, 4.0, 4.1 Reference Manual
Copyright 1997-2008 MySQL AB
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 MySQL 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 MySQL AB. MySQL AB reserves 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 <docs@mysql.com >.
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 3.23 through MySQL 4.1.24.
Document generated on: 2008-01-11 (revision: 9563)
End of Product Lifecycle. Active development and support for MySQL database server versions 3.23, 4.0, and 4.1 has ended. However, for MySQL 4.0 and 4.1, there is still extended support available. For details, see http://www.mysql.com/company/legal/lifecycle/#calendar . According to the MySQL Lifecycle Policy (see http://www.mysql.com/company/legal/lifecycle/#policy ), only Security and Severity Level 1 issues will still be fixed for MySQL 4.0 and 4.1. Please consider upgrading to a recent version (MySQL 5.0 or 5.1).
Table of Contents [+/-]
Preface
1. General Information [+/-]
1.1. About This Manual 1.2. Conventions Used in This Manual 1.3. Overview of MySQL AB 1.4. Overview of the MySQL Database Management System [+/-] 1.4.1. What is MySQL? 1.4.2. History of MySQL 1.4.3. The Main Features of MySQL 1.5. MySQL Development Roadmap [+/-] 1.5.1. MySQL 4.0 in a Nutshell 1.5.2. MySQL 4.1 in a Nutshell 1.5.3. What's New in MySQL 5.0 1.6. MySQL Information Sources [+/-] 1.6.1. MySQL Mailing Lists 1.6.2. MySQL Community Support at the MySQL Forums 1.6.3. MySQL Community Support on Internet Relay Chat (IRC) 1.6.4. MySQL Enterprise 1.7. How to Report Bugs or Problems 1.8. MySQL Standards Compliance [+/-] 1.8.1. What Standards MySQL Follows 1.8.2. Selecting SQL Modes 1.8.3. Running MySQL in ANSI Mode 1.8.4. MySQL Extensions to Standard SQL 1.8.5. MySQL Differences from Standard SQL 1.8.6. How MySQL Deals with Constraints
2. Installing and Upgrading MySQL [+/-]
2.1. General Installation Issues [+/-] 2.1.1. Operating Systems On Which MySQL Is Known To Run 2.1.2. Choosing Which MySQL Distribution to Install 2.1.3. How to Get MySQL 2.1.4. Verifying Package Integrity Using MD5 Checksums or GnuPG 2.1.5. Installation Layouts 2.2. Standard MySQL Installation Using a Binary Distribution 2.3. Installing MySQL on Windows [+/-] 2.3.1. Choosing An Installation Package 2.3.2. Installing MySQL with the Automated Installer 2.3.3. Using the MySQL Installation Wizard 2.3.4. Using the Configuration Wizard 2.3.5. Installing MySQL from a Noinstall Zip Archive 2.3.6. Extracting the Install Archive 2.3.7. Creating an Option File 2.3.8. Selecting a MySQL Server Type 2.3.9. Starting the Server for the First Time 2.3.10. Starting MySQL from the Windows Command Line 2.3.11. Starting MySQL as a Windows Service 2.3.12. Testing The MySQL Installation 2.3.13. Troubleshooting a MySQL Installation Under Windows 2.3.14. Upgrading MySQL on Windows 2.3.15. MySQL on Windows Compared to MySQL on Unix 2.4. Installing MySQL from RPM Packages on Linux 2.5. Installing MySQL on Mac OS X 2.6. Installing MySQL on Solaris 2.7. Installing MySQL on NetWare 2.8. Installing MySQL from tar.gz Packages on Other Unix-Like Systems 2.9. MySQL Installation Using a Source Distribution [+/-] 2.9.1. Source Installation Overview 2.9.2. Typical configure Options 2.9.3. Installing from the Development Source Tree 2.9.4. Dealing with Problems Compiling MySQL 2.9.5. MIT-pthreads Notes 2.9.6. Installing MySQL from Source on Windows 2.9.7. Compiling MySQL Clients on Windows 2.10. Post-Installation Setup and Testing [+/-] 2.10.1. Windows Post-Installation Procedures 2.10.2. Unix Post-Installation Procedures 2.10.3. Securing the Initial MySQL Accounts 2.11. Upgrading MySQL [+/-] 2.11.1. Upgrading from MySQL 4.0 to 4.1 2.11.2. Upgrading from MySQL 3.23 to 4.0 2.11.3. Copying MySQL Databases to Another Machine 2.12. Downgrading MySQL [+/-] 2.12.1. Downgrading to MySQL 4.02.13. Operating System-Specific Notes [+/-] 2.13.1. Linux Notes 2.13.2. Mac OS X Notes 2.13.3. Solaris Notes 2.13.4. BSD Notes 2.13.5. Other Unix Notes 2.13.6. OS/2 Notes 2.14. Environment Variables 2.15. Perl Installation Notes [+/-] 2.15.1. Installing Perl on Unix 2.15.2. Installing ActiveState Perl on Windows 2.15.3. Problems Using the Perl DBI/DBD Interface 2.16. Porting to Other Systems [+/-] 2.16.1. Debugging a MySQL Server 2.16.2. Debugging a MySQL Client 2.16.3. The DBUG Package 2.16.4. Comments about RTS Threads 2.16.5. Differences Between Thread Packages
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. Specifying Program Options 4.2.3. 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_src_distribution — Create Source Distribution for Windows 4.4.3. mysql_create_system_tables — Generate Statements to Initialize MySQL System Tables 4.4.4. mysql_fix_privilege_tables — Upgrade MySQL System Tables 4.4.5. mysql_install_db — Initialize MySQL Data Directory 4.4.6. mysql_secure_installation — Improve MySQL Installation Security 4.4.7. mysql_tzinfo_to_sql — Load the Time Zone Tables 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. myisam_ftdump — Display Full-Text Index information 4.6.2. myisamchk — MyISAM Table-Maintenance Utility 4.6.3. myisamlog — Display MyISAM Log File Contents 4.6.4. myisampack — Generate Compressed, Read-Only MyISAM Tables 4.6.5. mysqlaccess — Client for Checking Access Privileges 4.6.6. mysqlbinlog — Utility for Processing Binary Log Files 4.6.7. mysqlhotcopy — A Database Backup Program 4.6.8. mysqlmanagerc — Internal Test-Suite Program 4.6.9. mysqlmanager-pwgen — Internal Test-Suite Program 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. Option and Variable Reference 5.1.2. Command Options 5.1.3. System Variables 5.1.4. Using System Variables 5.1.5. Status Variables 5.1.6. SQL Modes 5.1.7. Server-Side Help 5.1.8. Server Response to Signals 5.1.9. The Shutdown Process 5.2. The mysqld-max Extended MySQL Server 5.3. MySQL Server Logs [+/-] 5.3.1. The Error Log 5.3.2. The General Query Log 5.3.3. The Update Log 5.3.4. The Binary Log 5.3.5. The Slow Query Log 5.3.6. Server Log Maintenance 5.4. General Security Issues [+/-] 5.4.1. General Security Guidelines 5.4.2. Making MySQL Secure Against Attackers 5.4.3. Security-Related mysqld Options 5.4.4. Security Issues with LOAD DATA LOCAL 5.4.5. How to Run MySQL as a Normal User 5.5. The MySQL Access Privilege System [+/-] 5.5.1. What the Privilege System Does 5.5.2. How the Privilege System Works 5.5.3. Privileges Provided by MySQL 5.5.4. Connecting to the MySQL Server 5.5.5. Access Control, Stage 1: Connection Verification 5.5.6. Access Control, Stage 2: Request Verification 5.5.7. When Privilege Changes Take Effect 5.5.8. Causes of Access denied Errors 5.5.9. Password Hashing as of MySQL 4.1 5.6. MySQL User Account Management [+/-] 5.6.1. MySQL Usernames and Passwords 5.6.2. Adding New User Accounts to MySQL 5.6.3. Removing User Accounts from MySQL 5.6.4. Limiting Account Resources 5.6.5. Assigning Account Passwords 5.6.6. Keeping Your Password Secure 5.6.7. Using Secure Connections 5.7. Backup and Recovery [+/-] 5.7.1. Database Backups 5.7.2. Example Backup and Recovery Strategy 5.7.3. Point-in-Time Recovery 5.7.4. Table Maintenance and Crash Recovery 5.8. Running Multiple MySQL Servers on the Same Machine [+/-] 5.8.1. Running Multiple Servers on Windows 5.8.2. Running Multiple Servers on Unix 5.8.3. Using Client Programs in a Multiple-Server Environment
6. Replication [+/-]
6.1. Introduction to Replication 6.2. Replication Implementation Overview 6.3. Replication Implementation Details [+/-] 6.3.1. Replication Relay and Status Files6.4. How to Set Up Replication 6.5. Replication Compatibility Between MySQL Versions 6.6. Upgrading a Replication Setup [+/-] 6.6.1. Upgrading Replication to 4.0 or 4.16.7. Replication Features and Known Problems 6.8. Replication Startup Options 6.9. How Servers Evaluate Replication Rules 6.10. Replication FAQ 6.11. Troubleshooting Replication 6.12. How to Report Replication Bugs or Problems
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. IS NULL Optimization 7.2.7. LEFT JOIN and RIGHT JOIN Optimization 7.2.8. ORDER BY Optimization 7.2.9. GROUP BY Optimization 7.2.10. DISTINCT Optimization 7.2.11. LIMIT Optimization 7.2.12. How to Avoid Table Scans 7.2.13. Speed of INSERT Statements 7.2.14. Speed of UPDATE Statements 7.2.15. Speed of DELETE Statements 7.2.16. 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. Drawbacks to 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. The MySQL Query Cache 7.5.4. Examining Thread Information 7.5.5. How Compiling and Linking Affects the Speed of MySQL 7.5.6. How MySQL Uses Memory 7.5.7. How MySQL Uses Internal Temporary Tables 7.5.8. 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. NULL Values 8.2. Database, Table, Index, Column, and Alias 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. Collation Issues 9.1.6. Operations Affected by Character Set Support 9.1.7. Unicode Support 9.1.8. UTF-8 for Metadata 9.1.9. Upgrading Character Sets from MySQL 4.0 9.1.10. Character Sets and Collations That MySQL Supports 9.2. The Character Set Used for Data and Sorting [+/-] 9.2.1. Using the German Character Set9.3. Setting the Error Message Language 9.4. Adding a New Character Set 9.5. The Character Definition Arrays 9.6. String Collating Support 9.7. Multi-Byte Character Support 9.8. Problems With Character Sets 9.9. MySQL Server Time Zone Support 9.10. 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
12. SQL Statement Syntax [+/-]
12.1. Data Definition Statements [+/-] 12.1.1. ALTER DATABASE Syntax 12.1.2. ALTER TABLE Syntax 12.1.3. CREATE DATABASE Syntax 12.1.4. CREATE INDEX Syntax 12.1.5. CREATE TABLE Syntax 12.1.6. DROP DATABASE Syntax 12.1.7. DROP INDEX Syntax 12.1.8. DROP TABLE Syntax 12.1.9. RENAME TABLE Syntax 12.2. Data Manipulation Statements [+/-] 12.2.1. DELETE Syntax 12.2.2. DO Syntax 12.2.3. HANDLER Syntax 12.2.4. INSERT Syntax 12.2.5. LOAD DATA INFILE Syntax 12.2.6. REPLACE Syntax 12.2.7. SELECT Syntax 12.2.8. Subquery Syntax 12.2.9. TRUNCATE Syntax 12.2.10. UPDATE Syntax 12.3. MySQL Utility Statements [+/-] 12.3.1. DESCRIBE Syntax 12.3.2. HELP Syntax 12.3.3. 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.5. Database Administration Statements [+/-] 12.5.1. Account Management Statements 12.5.2. Table Maintenance Statements 12.5.3. SET Syntax 12.5.4. SHOW Syntax 12.5.5. 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
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 in MySQL 3.23 13.2.4. InnoDB Configuration 13.2.5. InnoDB Startup Options and System Variables 13.2.6. Creating the InnoDB Tablespace 13.2.7. Creating and Using InnoDB Tables 13.2.8. Adding and Removing InnoDB Data and Log Files 13.2.9. Backing Up and Recovering an InnoDB Database 13.2.10. Moving an InnoDB Database to Another Machine 13.2.11. InnoDB Transaction Model and Locking 13.2.12. InnoDB Performance Tuning Tips 13.2.13. Implementation of Multi-Versioning 13.2.14. InnoDB Table and Index Structures 13.2.15. InnoDB File Space Management and Disk I/O 13.2.16. InnoDB Error Handling 13.2.17. Restrictions on InnoDB Tables 13.2.18. InnoDB Troubleshooting 13.3. The MERGE Storage Engine [+/-] 13.3.1. MERGE Table Problems13.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 ARCHIVE Storage Engine 13.8. The CSV Storage Engine 13.9. The BLACKHOLE Storage Engine 13.10. The ISAM Storage Engine
14. MySQL Cluster [+/-]
14.1. MySQL Cluster Overview [+/-] 14.1.1. MySQL Cluster Core Concepts 14.1.2. MySQL Cluster Nodes, Node Groups, Replicas, and Partitions 14.2. Simple Multi-Computer How-To [+/-] 14.2.1. Hardware, Software, and Networking 14.2.2. Multi-Computer Installation 14.2.3. Multi-Computer Configuration 14.2.4. Initial Startup 14.2.5. Loading Sample Data and Performing Queries 14.2.6. Safe Shutdown and Restart 14.3. MySQL Cluster Configuration [+/-] 14.3.1. Building MySQL Cluster from Source Code 14.3.2. Installing the Cluster Software 14.3.3. Quick Test Setup of MySQL Cluster 14.3.4. Configuration File 14.3.5. Overview of Cluster Configuration Parameters 14.3.6. Configuring Parameters for Local Checkpoints 14.4. Upgrading and Downgrading MySQL Cluster [+/-] 14.4.1. Performing a Rolling Restart of the Cluster 14.4.2. Cluster Upgrade and Downgrade Compatibility 14.5. Process Management in MySQL Cluster [+/-] 14.5.1. MySQL Server Process Usage for MySQL Cluster 14.5.2. ndbd — The Storage Engine Node Process 14.5.3. ndb_mgmd — The Management Server Process 14.5.4. ndb_mgm — The Management Client Process 14.5.5. Command Options for MySQL Cluster Processes 14.6. Management of MySQL Cluster [+/-] 14.6.1. Summary of MySQL Cluster Start Phases 14.6.2. Commands in the MySQL Cluster Management Client 14.6.3. Event Reports Generated in MySQL Cluster 14.6.4. Single User Mode 14.6.5. Quick Reference: MySQL Cluster SQL Statements 14.7. On-line Backup of MySQL Cluster [+/-] 14.7.1. Cluster Backup Concepts 14.7.2. Using The Management Client to Create a Backup 14.7.3. ndb_restore — Restore a Cluster Backup 14.7.4. Configuration for Cluster Backup 14.7.5. Backup Troubleshooting 14.8. Cluster Utility Programs [+/-] 14.8.1. ndb_config — Extract NDB Configuration Information 14.8.2. ndb_cpcd — Automate Testing for NDB Development 14.8.3. ndb_delete_all — Delete All Rows from NDB Table 14.8.4. ndb_desc — Describe NDB Tables 14.8.5. ndb_drop_index — Drop Index from NDB Table 14.8.6. ndb_drop_table — Drop NDB Table 14.8.7. ndb_error_reporter — NDB Error-Reporting Utility 14.8.8. ndb_print_backup_file — Print NDB Backup File Contents 14.8.9. ndb_print_schema_file — Print NDB Schema File Contents 14.8.10. ndb_print_sys_file — Print NDB System File Contents 14.8.11. ndb_select_all — Print Rows from NDB Table 14.8.12. ndb_select_count — Print Row Counts for NDB Tables 14.8.13. ndb_show_tables — Display List of NDB Tables 14.8.14. ndb_size.pl — NDBCluster Size Requirement Estimator 14.8.15. ndb_waiter — Wait for Cluster to Reach a Given Status 14.9. Using High-Speed Interconnects with MySQL Cluster [+/-] 14.9.1. Configuring MySQL Cluster to use SCI Sockets 14.9.2. Understanding the Impact of Cluster Interconnects 14.10. Known Limitations of MySQL Cluster [+/-] 14.10.1. Non-Compliance In SQL Syntax 14.10.2. Limits and Differences from Standard MySQL Limits 14.10.3. Limits Relating to Transaction Handling 14.10.4. Error Handling 14.10.5. Limits Associated with Database Objects 14.10.6. Unsupported Or Missing Features 14.10.7. Limitations Relating to Performance 14.10.8. Issues Exclusive to MySQL Cluster 14.10.9. Limitations Relating to Multiple Cluster Nodes 14.11. MySQL Cluster FAQ 14.12. MySQL Cluster Glossary
15. Spatial Extensions [+/-]
15.1. Introduction to MySQL Spatial Support 15.2. The OpenGIS Geometry Model [+/-] 15.2.1. The Geometry Class Hierarchy 15.2.2. Class Geometry 15.2.3. Class Point 15.2.4. Class Curve 15.2.5. Class LineString 15.2.6. Class Surface 15.2.7. Class Polygon 15.2.8. Class GeometryCollection 15.2.9. Class MultiPoint 15.2.10. Class MultiCurve 15.2.11. Class MultiLineString 15.2.12. Class MultiSurface 15.2.13. Class MultiPolygon 15.3. Supported Spatial Data Formats [+/-] 15.3.1. Well-Known Text (WKT) Format 15.3.2. Well-Known Binary (WKB) Format 15.4. Creating a Spatially Enabled MySQL Database [+/-] 15.4.1. MySQL Spatial Data Types 15.4.2. Creating Spatial Values 15.4.3. Creating Spatial Columns 15.4.4. Populating Spatial Columns 15.4.5. Fetching Spatial Data 15.5. Analyzing Spatial Information [+/-] 15.5.1. Geometry Format Conversion Functions 15.5.2. Geometry Functions 15.5.3. Functions That Create New Geometries from Existing Ones 15.5.4. Functions for Testing Spatial Relations Between Geometric Objects 15.5.5. Relations on Geometry Minimal Bounding Rectangles (MBRs) 15.5.6. Functions That Test Spatial Relationships Between Geometries 15.6. Optimizing Spatial Analysis [+/-] 15.6.1. Creating Spatial Indexes 15.6.2. Using a Spatial Index 15.7. MySQL Conformance and Compatibility
16. APIs and Libraries [+/-]
16.1. libmysqld, the Embedded MySQL Server Library [+/-] 16.1.1. Compiling Programs with libmysqld 16.1.2. Restrictions When Using the Embedded MySQL Server 16.1.3. Options with the Embedded Server 16.1.4. Embedded Server Examples 16.1.5. Licensing the Embedded Server 16.2. MySQL C API [+/-] 16.2.1. C API Data Types 16.2.2. C API Function Overview 16.2.3. C API Function Descriptions 16.2.4. C API Prepared Statements 16.2.5. C API Prepared Statement Data types 16.2.6. C API Prepared Statement Function Overview 16.2.7. C API Prepared Statement Function Descriptions 16.2.8. C API Prepared Statement Problems 16.2.9. C API Handling of Multiple Statement Execution 16.2.10. C API Handling of Date and Time Values 16.2.11. C API Threaded Function Descriptions 16.2.12. C API Embedded Server Function Descriptions 16.2.13. Controlling Automatic Reconnect Behavior 16.2.14. Common Questions and Problems When Using the C API 16.2.15. Building Client Programs 16.2.16. How to Make a Threaded Client 16.3. MySQL PHP API [+/-] 16.3.1. Common Problems with MySQL and PHP 16.3.2. Enabling Both mysql and mysqli in PHP 16.4. MySQL Perl API 16.5. MySQL C++ API 16.6. MySQL Python API 16.7. MySQL Tcl API 16.8. MySQL Eiffel Wrapper
17. Connectors [+/-]
17.1. MySQL Connector/ODBC [+/-] 17.1.1. Connector/ODBC Versions 17.1.2. Introduction to Connector/ODBC 17.1.3. Connector/ODBC Installation 17.1.4. Connector/ODBC Configuration 17.1.5. Connector/ODBC Examples 17.1.6. Connector/ODBC Reference 17.1.7. Connector/ODBC Notes and Tips 17.1.8. Connector/ODBC Support 17.2. MySQL Connector/NET [+/-] 17.2.1. Connector/NET Versions 17.2.2. Connector/NET Installation 17.2.3. Connector/NET Examples and Usage Guide 17.2.4. Connector/NET Reference 17.2.5. Connector/NET Notes and Tips 17.2.6. Connector/NET Support 17.3. MySQL Visual Studio Plugin [+/-] 17.3.1. Installing the MySQL Visual Studio Plugin 17.3.2. Creating a connection to the MySQL server 17.3.3. Using the MySQL Visual Studio Plugin 17.3.4. Visual Studio Plugin Support 17.4. MySQL Connector/J [+/-] 17.4.1. Connector/J Versions 17.4.2. Connector/J Installation 17.4.3. Connector/J Examples 17.4.4. Connector/J (JDBC) Reference 17.4.5. Connector/J Notes and Tips 17.4.6. Connector/J Support 17.5. MySQL Connector/MXJ [+/-] 17.5.1. Introduction to Connector/MXJ 17.5.2. Connector/MXJ Installation 17.5.3. Connector/MXJ Configuration 17.5.4. Connector/MXJ Reference 17.5.5. Connector/MXJ Notes and Tips 17.5.6. Connector/MXJ Support 17.6. Connector/PHP
18. MySQL Proxy [+/-]
18.1. MySQL Proxy Supported Platforms 18.2. Installing MySQL Proxy [+/-] 18.2.1. Installing MySQL Proxy from a binary distribution 18.2.2. Installing MySQL Proxy from a source distribution 18.2.3. Installing MySQL Proxy from the Subversion repository 18.3. MySQL Proxy Command Line Options 18.4. MySQL Proxy Scripting [+/-] 18.4.1. Proxy Scripting Sequence During Query Injection 18.4.2. Internal Structures 18.4.3. Capturing a connection with connect_server() 18.4.4. Examining the handshake with read_handshake() 18.4.5. Examining the authentication credentials with read_auth() 18.4.6. Accessing authentication information with read_auth_result() 18.4.7. Manipulating Queries with read_query() 18.4.8. Manipulating Results with read_query_result() 18.5. Using MySQL Proxy [+/-] 18.5.1. Using the Administration Interface
19. Extending MySQL [+/-]
19.1. MySQL Internals [+/-] 19.1.1. MySQL Threads 19.1.2. MySQL Test Suite 19.2. Adding New Functions to MySQL [+/-] 19.2.1. Features of the User-Defined Function Interface 19.2.2. CREATE FUNCTION Syntax 19.2.3. DROP FUNCTION Syntax 19.2.4. Adding a New User-Defined Function 19.2.5. Adding a New Native Function 19.3. Adding New Procedures to MySQL [+/-] 19.3.1. Procedure Analyse 19.3.2. Writing a Procedure
A. Errors, Error Codes, and Common Problems [+/-]
A.1. Problems and Common Errors [+/-] A.1.1. How to Determine What Is Causing a Problem A.1.2. Common Errors When Using MySQL Programs A.1.3. Installation-Related Issues A.1.4. Administration-Related Issues A.1.5. Query-Related Issues A.1.6. Optimizer-Related Issues A.1.7. Table Definition-Related Issues A.1.8. Known Issues in MySQL A.2. Server Error Codes and Messages A.3. Client Error Codes and Messages
B. MySQL Change History [+/-]
B.1. Changes in release 4.1.x (Production) [+/-] B.1.1. Changes in MySQL 4.1.24 (Not yet released) B.1.2. Changes in MySQL 4.1.23 (12 June 2007) B.1.3. Changes in MySQL 4.1.22 (02 November 2006) B.1.4. Changes in MySQL 4.1.21 (19 July 2006) B.1.5. Changes in MySQL 4.1.20 (24 May 2006) B.1.6. Changes in MySQL 4.1.19 (29 April 2006) B.1.7. Changes in MySQL 4.1.18 (27 January 2006) B.1.8. Changes in MySQL 4.1.17 (Not released) B.1.9. Changes in MySQL 4.1.16 (29 November 2005) B.1.10. Changes in MySQL 4.1.15 (13 October 2005) B.1.11. Changes in MySQL 4.1.14 (17 August 2005) B.1.12. Changes in MySQL 4.1.13 (15 July 2005) B.1.13. Changes in MySQL 4.1.12 (13 May 2005) B.1.14. Changes in MySQL 4.1.11 (01 April 2005) B.1.15. Changes in MySQL 4.1.10 (12 February 2005) B.1.16. Changes in MySQL 4.1.9 (11 January 2005) B.1.17. Changes in MySQL 4.1.8 (14 December 2004) B.1.18. Changes in MySQL 4.1.7 (23 October 2004: Production) B.1.19. Changes in MySQL 4.1.6 (10 October 2004) B.1.20. Changes in MySQL 4.1.5 (16 September 2004) B.1.21. Changes in MySQL 4.1.4 (26 August 2004: Gamma) B.1.22. Changes in MySQL 4.1.3 (28 June 2004: Beta) B.1.23. Changes in MySQL 4.1.2 (28 May 2004) B.1.24. Changes in MySQL 4.1.1 (01 December 2003) B.1.25. Changes in MySQL 4.1.0 (03 April 2003: Alpha) B.2. Changes in release 4.0.x [+/-] B.2.1. Changes in release 4.0.31 (Not yet released) B.2.2. Changes in release 4.0.30 (12 February 2007) B.2.3. Changes in release 4.0.29 (Not released) B.2.4. Changes in release 4.0.28 (Not released) B.2.5. Changes in release 4.0.27 (06 May 2006) B.2.6. Changes in release 4.0.26 (08 September 2005) B.2.7. Changes in release 4.0.25 (05 July 2005) B.2.8. Changes in release 4.0.24 (04 March 2005) B.2.9. Changes in release 4.0.23 (18 December 2004) B.2.10. Changes in release 4.0.22 (27 October 2004) B.2.11. Changes in release 4.0.21 (06 September 2004) B.2.12. Changes in release 4.0.20 (17 May 2004) B.2.13. Changes in release 4.0.19 (04 May 2004) B.2.14. Changes in release 4.0.18 (12 February 2004) B.2.15. Changes in release 4.0.17 (14 December 2003) B.2.16. Changes in release 4.0.16 (17 October 2003) B.2.17. Changes in release 4.0.15 (03 September 2003) B.2.18. Changes in release 4.0.14 (18 July 2003) B.2.19. Changes in release 4.0.13 (16 May 2003) B.2.20. Changes in release 4.0.12 (15 March 2003: Production) B.2.21. Changes in release 4.0.11 (20 February 2003) B.2.22. Changes in release 4.0.10 (29 January 2003) B.2.23. Changes in release 4.0.9 (09 January 2003) B.2.24. Changes in release 4.0.8 (07 January 2003) B.2.25. Changes in release 4.0.7 (20 December 2002) B.2.26. Changes in release 4.0.6 (14 December 2002: Gamma) B.2.27. Changes in release 4.0.5 (13 November 2002) B.2.28. Changes in release 4.0.4 (29 September 2002) B.2.29. Changes in release 4.0.3 (26 August 2002: Beta) B.2.30. Changes in release 4.0.2 (01 July 2002) B.2.31. Changes in release 4.0.1 (23 December 2001) B.2.32. Changes in release 4.0.0 (October 2001: Alpha) B.3. Changes in release 3.23.x [+/-] B.3.1. Changes in release 3.23.59 (Not yet released) B.3.2. Changes in release 3.23.58 (11 September 2003) B.3.3. Changes in release 3.23.57 (06 June 2003) B.3.4. Changes in release 3.23.56 (13 March 2003) B.3.5. Changes in release 3.23.55 (23 January 2003) B.3.6. Changes in release 3.23.54 (05 December 2002) B.3.7. Changes in release 3.23.53 (09 October 2002) B.3.8. Changes in release 3.23.52 (14 August 2002) B.3.9. Changes in release 3.23.51 (31 May 2002) B.3.10. Changes in release 3.23.50 (21 April 2002) B.3.11. Changes in release 3.23.49 (14 February 2002) B.3.12. Changes in release 3.23.48 (07 February 2002) B.3.13. Changes in release 3.23.47 (27 December 2001) B.3.14. Changes in release 3.23.46 (29 November 2001) B.3.15. Changes in release 3.23.45 (22 November 2001) B.3.16. Changes in release 3.23.44 (31 October 2001) B.3.17. Changes in release 3.23.43 (04 October 2001) B.3.18. Changes in release 3.23.42 (08 September 2001) B.3.19. Changes in release 3.23.41 (11 August 2001) B.3.20. Changes in release 3.23.40 (18 July 2001) B.3.21. Changes in release 3.23.39 (12 June 2001) B.3.22. Changes in release 3.23.38 (09 May 2001) B.3.23. Changes in release 3.23.37 (17 April 2001) B.3.24. Changes in release 3.23.36 (27 March 2001) B.3.25. Changes in release 3.23.35 (15 March 2001) B.3.26. Changes in release 3.23.34a (11 March 2001) B.3.27. Changes in release 3.23.34 (10 March 2001) B.3.28. Changes in release 3.23.33 (09 February 2001) B.3.29. Changes in release 3.23.32 (22 January 2001) B.3.30. Changes in release 3.23.31 (17 January 2001: Production) B.3.31. Changes in release 3.23.30 (04 January 2001) B.3.32. Changes in release 3.23.29 (16 December 2000) B.3.33. Changes in release 3.23.28 (22 November 2000: Gamma) B.3.34. Changes in release 3.23.27 (24 October 2000) B.3.35. Changes in release 3.23.26 (18 October 2000) B.3.36. Changes in release 3.23.25 (29 September 2000) B.3.37. Changes in release 3.23.24 (08 September 2000) B.3.38. Changes in release 3.23.23 (01 September 2000) B.3.39. Changes in release 3.23.22 (31 July 2000) B.3.40. Changes in release 3.23.21 (04 July 2000) B.3.41. Changes in release 3.23.20 (28 June 2000: Beta) B.3.42. Changes in release 3.23.19 B.3.43. Changes in release 3.23.18 (11 June 2000) B.3.44. Changes in release 3.23.17 (07 June 2000) B.3.45. Changes in release 3.23.16 (16 May 2000) B.3.46. Changes in release 3.23.15 (08 May 2000) B.3.47. Changes in release 3.23.14 (09 April 2000) B.3.48. Changes in release 3.23.13 (14 March 2000) B.3.49. Changes in release 3.23.12 (07 March 2000) B.3.50. Changes in release 3.23.11 (16 February 2000) B.3.51. Changes in release 3.23.10 (30 January 2000) B.3.52. Changes in release 3.23.9 (29 January 2000) B.3.53. Changes in release 3.23.8 (02 January 2000) B.3.54. Changes in release 3.23.7 (10 December 1999) B.3.55. Changes in release 3.23.6 (15 December 1999) B.3.56. Changes in release 3.23.5 (20 October 1999) B.3.57. Changes in release 3.23.4 (28 September 1999) B.3.58. Changes in release 3.23.3 (13 September 1999) B.3.59. Changes in release 3.23.2 (09 August 1999) B.3.60. Changes in release 3.23.1 (08 July 1999) B.3.61. Changes in release 3.23.0 (05 July 1999: Alpha) B.4. Changes in InnoDB [+/-] B.4.1. Changes in MySQL/InnoDB-4.0.21, September 10, 2004 B.4.2. Changes in MySQL/InnoDB-4.1.4, August 31, 2004 B.4.3. Changes in MySQL/InnoDB-4.1.3, June 28, 2004 B.4.4. Changes in MySQL/InnoDB-4.1.2, May 30, 2004 B.4.5. Changes in MySQL/InnoDB-4.0.20, May 18, 2004 B.4.6. Changes in MySQL/InnoDB-4.0.19, May 4, 2004 B.4.7. Changes in MySQL/InnoDB-4.0.18, February 13, 2004 B.4.8. Changes in MySQL/InnoDB-5.0.0, December 24, 2003 B.4.9. Changes in MySQL/InnoDB-4.0.17, December 17, 2003 B.4.10. Changes in MySQL/InnoDB-4.1.1, December 4, 2003 B.4.11. Changes in MySQL/InnoDB-4.0.16, October 22, 2003 B.4.12. Changes in MySQL/InnoDB-3.23.58, September 15, 2003 B.4.13. Changes in MySQL/InnoDB-4.0.15, September 10, 2003 B.4.14. Changes in MySQL/InnoDB-4.0.14, July 22, 2003 B.4.15. Changes in MySQL/InnoDB-3.23.57, June 20, 2003 B.4.16. Changes in MySQL/InnoDB-4.0.13, May 20, 2003 B.4.17. Changes in MySQL/InnoDB-4.1.0, April 3, 2003 B.4.18. Changes in MySQL/InnoDB-3.23.56, March 17, 2003 B.4.19. Changes in MySQL/InnoDB-4.0.12, March 18, 2003 B.4.20. Changes in MySQL/InnoDB-4.0.11, February 25, 2003 B.4.21. Changes in MySQL/InnoDB-4.0.10, February 4, 2003 B.4.22. Changes in MySQL/InnoDB-3.23.55, January 24, 2003 B.4.23. Changes in MySQL/InnoDB-4.0.9, January 14, 2003 B.4.24. Changes in MySQL/InnoDB-4.0.8, January 7, 2003 B.4.25. Changes in MySQL/InnoDB-4.0.7, December 26, 2002 B.4.26. Changes in MySQL/InnoDB-4.0.6, December 19, 2002 B.4.27. Changes in MySQL/InnoDB-3.23.54, December 12, 2002 B.4.28. Changes in MySQL/InnoDB-4.0.5, November 18, 2002 B.4.29. Changes in MySQL/InnoDB-3.23.53, October 9, 2002 B.4.30. Changes in MySQL/InnoDB-4.0.4, October 2, 2002 B.4.31. Changes in MySQL/InnoDB-4.0.3, August 28, 2002 B.4.32. Changes in MySQL/InnoDB-3.23.52, August 16, 2002 B.4.33. Changes in MySQL/InnoDB-4.0.2, July 10, 2002 B.4.34. Changes in MySQL/InnoDB-3.23.51, June 12, 2002 B.4.35. Changes in MySQL/InnoDB-3.23.50, April 23, 2002 B.4.36. Changes in MySQL/InnoDB-3.23.49, February 17, 2002 B.4.37. Changes in MySQL/InnoDB-3.23.48, February 9, 2002 B.4.38. Changes in MySQL/InnoDB-3.23.47, December 28, 2001 B.4.39. Changes in MySQL/InnoDB-4.0.1, December 23, 2001 B.4.40. Changes in MySQL/InnoDB-3.23.46, November 30, 2001 B.4.41. Changes in MySQL/InnoDB-3.23.45, November 23, 2001 B.4.42. Changes in MySQL/InnoDB-3.23.44, November 2, 2001 B.4.43. Changes in MySQL/InnoDB-3.23.43, October 4, 2001 B.4.44. Changes in MySQL/InnoDB-3.23.42, September 9, 2001 B.4.45. Changes in MySQL/InnoDB-3.23.41, August 13, 2001 B.4.46. Changes in MySQL/InnoDB-3.23.40, July 16, 2001 B.4.47. Changes in MySQL/InnoDB-3.23.39, June 13, 2001 B.4.48. Changes in MySQL/InnoDB-3.23.38, May 12, 2001 B.5. Changes in MySQL Cluster [+/-] B.5.1. Changes in MySQL Cluster-5.0.7 (10 June 2005) B.5.2. Changes in MySQL Cluster-5.0.6 (26 May 2005) B.5.3. Changes in MySQL Cluster-5.0.5 (Not released) B.5.4. Changes in MySQL Cluster-5.0.4 (16 April 2005) B.5.5. Changes in MySQL Cluster-5.0.3 (23 March 2005: Beta) B.5.6. Changes in MySQL Cluster-5.0.1 (27 July 2004) B.5.7. Changes in MySQL Cluster-4.1.13 (15 July 2005) B.5.8. Changes in MySQL Cluster-4.1.12 (13 May 2005) B.5.9. Changes in MySQL Cluster-4.1.11 (01 April 2005) B.5.10. Changes in MySQL Cluster-4.1.10 (12 February 2005) B.5.11. Changes in MySQL Cluster-4.1.9 (13 January 2005) B.5.12. Changes in MySQL Cluster-4.1.8 (14 December 2004) B.5.13. Changes in MySQL Cluster-4.1.7 (23 October 2004) B.5.14. Changes in MySQL Cluster-4.1.6 (10 October 2004) B.5.15. Changes in MySQL Cluster-4.1.5 (16 September 2004) B.5.16. Changes in MySQL Cluster-4.1.4 (31 August 2004) B.5.17. Changes in MySQL Cluster-4.1.3 (28 June 2004) B.6. MySQL Connector/ODBC (MyODBC) Change History [+/-] B.6.1. Changes in MySQL Connector/ODBC 5.1.2 (Not yet released) B.6.2. Changes in MySQL Connector/ODBC 5.1.1 (13 December 2007) B.6.3. Changes in MySQL Connector/ODBC 5.1.0 (10 September 2007) B.6.4. Changes in MySQL Connector/ODBC 5.0.12 (Never released) B.6.5. Changes in MySQL Connector/ODBC 5.0.11 (31 January 2007) B.6.6. Changes in MySQL Connector/ODBC 5.0.10 (14 December 2006) B.6.7. Changes in MySQL Connector/ODBC 5.0.9 (22 November 2006) B.6.8. Changes in MySQL Connector/ODBC 5.0.8 (17 November 2006) B.6.9. Changes in MySQL Connector/ODBC 5.0.7 (08 November 2006) B.6.10. Changes in MySQL Connector/ODBC 5.0.6 (03 November 2006) B.6.11. Changes in MySQL Connector/ODBC 5.0.5 (17 October 2006) B.6.12. Changes in Connector/ODBC 5.0.3 (Connector/ODBC 5.0 Alpha 3) (20 June 2006) B.6.13. Changes in Connector/ODBC 5.0.2 (Never released) B.6.14. Changes in Connector/ODBC 5.0.1 (Connector/ODBC 5.0 Alpha 2) (05 June 2006) B.6.15. Changes in MySQL Connector/ODBC 3.51.23 (Not yet released) B.6.16. Changes in MySQL Connector/ODBC 3.51.22 (13 November 2007) B.6.17. Changes in MySQL Connector/ODBC 3.51.21 (08 October 2007) B.6.18. Changes in MySQL Connector/ODBC 3.51.20 (10 September 2007) B.6.19. Changes in MySQL Connector/ODBC 3.51.19 (10 August 2007) B.6.20. Changes in MySQL Connector/ODBC 3.51.18 (08 August 2007) B.6.21. Changes in MySQL Connector/ODBC 3.51.17 (14 July 2007) B.6.22. Changes in MySQL Connector/ODBC 3.51.16 (14 June 2007) B.6.23. Changes in MySQL Connector/ODBC 3.51.15 (7 May 2007) B.6.24. Changes in MySQL Connector/ODBC 3.51.14 (08 March 2007) B.6.25. Changes in MySQL Connector/ODBC 3.51.13 (Never released) B.6.26. Changes in MySQL Connector/ODBC 3.51.12 (11 Febrauary 2005) B.6.27. Changes in MySQL Connector/ODBC 3.51.11 (28 January 2005) B.7. MySQL Connector/NET Change History [+/-] B.7.1. Changes in MySQL Connector/NET 5.2.0 (Not yet released) B.7.2. Changes in MySQL Connector/NET 5.1.4 (20 November 2007) B.7.3. Changes in MySQL Connector/NET 5.1.3 (21 September 2007) B.7.4. Changes in MySQL Connector/NET 5.1.2 (18 June 2007) B.7.5. Changes in MySQL Connector/NET 5.1.1 (23 May 2007) B.7.6. Changes in MySQL Connector/NET 5.1.0 (01 May 2007) B.7.7. Changes in MySQL Connector/NET 5.0.9 (Not yet released) B.7.8. Changes in MySQL Connector/NET 5.0.8 (21 August 2007) B.7.9. Changes in MySQL Connector/NET 5.0.7 (18 May 2007) B.7.10. Changes in MySQL Connector/NET 5.0.6 (22 March 2007) B.7.11. Changes in MySQL Connector/NET 5.0.5 (07 March 2007) B.7.12. Changes in MySQL Connector/NET 5.0.4 (Not released) B.7.13. Changes in MySQL Connector/NET 5.0.3 (05 January 2007) B.7.14. Changes in MySQL Connector/NET 5.0.2 (06 November 2006) B.7.15. Changes in MySQL Connector/NET 5.0.1 (01 October 2006) B.7.16. Changes in MySQL Connector/NET 5.0.0 (08 August 2006) B.7.17. Changes in MySQL Connector/NET 1.0.11 (Not yet released) B.7.18. Changes in MySQL Connector/NET 1.0.10 (24 August 2007) B.7.19. Changes in MySQL Connector/NET 1.0.9 (02 February 2007) B.7.20. Changes in MySQL Connector/NET 1.0.8 (20 October 2006) B.7.21. Changes in MySQL Connector/NET 1.0.7 (21 November 2005) B.7.22. Changes in MySQL Connector/NET 1.0.6 (03 October 2005) B.7.23. Changes in MySQL Connector/NET 1.0.5 (29 August 2005) B.7.24. Changes in MySQL Connector/NET 1.0.4 (20 January 2005) B.7.25. Changes in MySQL Connector/NET 1.0.3 (12 October 2004) B.7.26. Changes in MySQL Connector/NET 1.0.2 (15 November 2004) B.7.27. Changes in MySQL Connector/NET 1.0.1 (27 October 2004) B.7.28. Changes in MySQL Connector/NET 1.0.0 (01 September 2004) B.7.29. Changes in MySQL Connector/NET Version 0.9.0 (30 August 2004) B.7.30. Changes in MySQL Connector/NET Version 0.76 B.7.31. Changes in MySQL Connector/NET Version 0.75 B.7.32. Changes in MySQL Connector/NET Version 0.74 B.7.33. Changes in MySQL Connector/NET Version 0.71 B.7.34. Changes in MySQL Connector/NET Version 0.70 B.7.35. Changes in MySQL Connector/NET Version 0.68 B.7.36. Changes in MySQL Connector/NET Version 0.65 B.7.37. Changes in MySQL Connector/NET Version 0.60 B.7.38. Changes in MySQL Connector/NET Version 0.50 B.8. MySQL Connector/J Change History [+/-] B.8.1. Changes in MySQL Connector/J 5.1.x B.8.2. Changes in MySQL Connector/J 5.0.x B.8.3. Changes in MySQL Connector/J 3.1.x B.8.4. Changes in MySQL Connector/J 3.0.x B.8.5. Changes in MySQL Connector/J 2.0.x B.8.6. Changes in MySQL Connector/J 1.2b (04 July 1999) B.8.7. Changes in MySQL Connector/J 1.2.x and lower B.9. MySQL Connector/MXJ Change History [+/-] B.9.1. Changes in MySQL Connector/MXJ 5.0.6 (04 May 2007) B.9.2. Changes in MySQL Connector/MXJ 5.0.5 (14 March 2007) B.9.3. Changes in MySQL Connector/MXJ 5.0.4 (28 January 2007) B.9.4. Changes in MySQL Connector/MXJ 5.0.3 (24 June 2006) B.9.5. Changes in MySQL Connector/MXJ 5.0.2 (15 June 2006) B.9.6. Changes in MySQL Connector/MXJ 5.0.1 (Never released) B.9.7. Changes in MySQL Connector/MXJ 5.0.0 (09 December 2005) B.10. MySQL Proxy Change History [+/-] B.10.1. Changes in MySQL Proxy 0.6.0 (Not yet released) B.10.2. Changes in MySQL Proxy 0.5.1 (30 June 2007) B.10.3. Changes in MySQL Proxy 0.5.0 (19 June 2007)
C. Limits and Restrictions [+/-]
C.1. Restrictions on Subqueries C.2. Restrictions on Character Sets C.3. Limits in MySQL [+/-] C.3.1. Limits of Joins C.3.2. The Maximum Number of Columns Per Table C.3.3. Windows Platform Limitations
D. Credits [+/-]
D.1. Developers at MySQL AB D.2. Contributors to MySQL D.3. Documenters and translators D.4. Libraries used by and included with MySQL D.5. Packages that support MySQL D.6. Tools that were used to create MySQL D.7. Supporters of MySQL
Index
List of Tables
17.1. Mapping of MySQL Error Numbers to SQLStates
List of Examples
17.1. Obtaining a connection from the DriverManager
17.2. Using java.sql.Statement to execute a SELECT query
17.3. Stored Procedures
17.4. Using Connection.prepareCall()
17.5. Registering output parameters
17.6. Setting CallableStatement input parameters
17.7. Retrieving results and output parameter values
17.8. Retrieving AUTO_INCREMENT column values using Statement.getGeneratedKeys()
17.9. Retrieving AUTO_INCREMENT column values using SELECT LAST_INSERT_ID()
17.10. Retrieving AUTO_INCREMENT column values in Updatable ResultSets
17.11. Using a connection pool with a J2EE application server
17.12. Example of transaction with retry logic
From:http://blog.csdn.net/yangchun301/archive/2008/01/13/2040879.aspx