Professional Documents
Culture Documents
html
1 General Information
1.1 About This Manual
1.1.1 Conventions Used in This Manual
1.2 Overview of the MySQL Database Management System
1.2.1 History of MySQL
1.2.2 The Main Features of MySQL
1.2.3 MySQL Stability
1.2.4 How Big MySQL Tables Can Be
1.2.5 Year 2000 Compliance
1.3 MySQL Development Roadmap
1.3.1 MySQL 4.0 in a Nutshell
1.3.1.1 Features Available in MySQL 4.0
1.3.1.2 The Embedded MySQL Server
1.3.2 MySQL 4.1 in a Nutshell
1.3.2.1 Features Available in MySQL 4.1
1.3.3 MySQL 5.0: The Next Development Release
1.4 MySQL Information Sources
1.4.1 MySQL Mailing Lists
1.4.1.1 The MySQL Mailing Lists
1.4.1.2 Asking Questions or Reporting Bugs
1.4.1.3 How to Report Bugs or Problems
1.4.1.4 Guidelines for Answering Questions on the Mailing List
1.4.2 MySQL Community Support on IRC (Internet Relay Chat)
1.4.3 MySQL Community Support at the MySQL Forums
1.5 MySQL Standards Compliance
1.5.1 What Standards MySQL Follows
1.5.2 Selecting SQL Modes
1.5.3 Running MySQL in ANSI Mode
1.5.4 MySQL Extensions to Standard SQL
1.5.5 MySQL Differences from Standard SQL
1.5.5.1 Subqueries
1.5.5.2 SELECT INTO TABLE
1.5.5.3 Transactions and Atomic Operations
1.5.5.4 Stored Procedures and Triggers
1.5.5.5 Foreign Keys
1.5.5.6 Views
1.5.5.7 `--' as the Start of a Comment
1.5.6 How MySQL Deals with Constraints
1.5.6.1 PRIMARY KEY and UNIQUE Index Constraints
1.5.6.2 Constraints on Invalid Data
1.5.6.3 ENUM and SET Constraints
1.5.7 Known Errors and Design Deficiencies in MySQL
1.5.7.1 Errors in 3.23 Fixed in a Later MySQL Version
1.5.7.2 Errors in 4.0 Fixed in a Later MySQL Version
1.5.7.3 Open Bugs and Design Deficiencies in MySQL
2 Installing MySQL
1 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
2 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
3 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
4 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
5 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
6 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
7 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
8 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
9 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
10 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
11 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
12 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
13 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
14 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
15 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
16 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
17 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
18 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
22.2.3.42 mysql_num_rows()
22.2.3.43 mysql_options()
22.2.3.44 mysql_ping()
22.2.3.45 mysql_query()
22.2.3.46 mysql_real_connect()
22.2.3.47 mysql_real_escape_string()
22.2.3.48 mysql_real_query()
22.2.3.49 mysql_reload()
22.2.3.50 mysql_row_seek()
22.2.3.51 mysql_row_tell()
22.2.3.52 mysql_select_db()
22.2.3.53 mysql_set_server_option()
22.2.3.54 mysql_shutdown()
22.2.3.55 mysql_sqlstate()
22.2.3.56 mysql_ssl_set()
22.2.3.57 mysql_stat()
22.2.3.58 mysql_store_result()
22.2.3.59 mysql_thread_id()
22.2.3.60 mysql_use_result()
22.2.3.61 mysql_warning_count()
22.2.3.62 mysql_commit()
22.2.3.63 mysql_rollback()
22.2.3.64 mysql_autocommit()
22.2.3.65 mysql_more_results()
22.2.3.66 mysql_next_result()
22.2.4 C API Prepared Statements
22.2.5 C API Prepared Statement Data types
22.2.6 C API Prepared Statement Function Overview
22.2.7 C API Prepared Statement Function Descriptions
22.2.7.1 mysql_stmt_affected_rows()
22.2.7.2 mysql_stmt_attr_get()
22.2.7.3 mysql_stmt_attr_set()
22.2.7.4 mysql_stmt_bind_param()
22.2.7.5 mysql_stmt_bind_result()
22.2.7.6 mysql_stmt_close()
22.2.7.7 mysql_stmt_data_seek()
22.2.7.8 mysql_stmt_errno()
22.2.7.9 mysql_stmt_error()
22.2.7.10 mysql_stmt_execute()
22.2.7.11 mysql_stmt_free_result()
22.2.7.12 mysql_stmt_insert_id()
22.2.7.13 mysql_stmt_fetch()
22.2.7.14 mysql_stmt_fetch_column()
22.2.7.15 mysql_stmt_field_count()
22.2.7.16 mysql_stmt_init()
22.2.7.17 mysql_stmt_num_rows()
22.2.7.18 mysql_stmt_param_count()
22.2.7.19 mysql_stmt_param_metadata()
22.2.7.20 mysql_stmt_prepare()
22.2.7.21 mysql_stmt_reset()
22.2.7.22 mysql_stmt_result_metadata()
19 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
22.2.7.23 mysql_stmt_row_seek()
22.2.7.24 mysql_stmt_row_tell()
22.2.7.25 mysql_stmt_send_long_data()
22.2.7.26 mysql_stmt_sqlstate()
22.2.7.27 mysql_stmt_store_result()
22.2.8 C API Prepared statement problems
22.2.9 C API Handling of Multiple Query Execution
22.2.10 C API Handling of Date and Time Values
22.2.11 C API Threaded Function Descriptions
22.2.11.1 my_init()
22.2.11.2 mysql_thread_init()
22.2.11.3 mysql_thread_end()
22.2.11.4 mysql_thread_safe()
22.2.12 C API Embedded Server Function Descriptions
22.2.12.1 mysql_server_init()
22.2.12.2 mysql_server_end()
22.2.13 Common questions and problems when using the C API
22.2.13.1 Why mysql_store_result() Sometimes Returns NULL After
mysql_query() Returns Success
22.2.13.2 What Results You Can Get from a Query
22.2.13.3 How to Get the Unique ID for the Last Inserted Row
22.2.13.4 Problems Linking with the C API
22.2.14 Building Client Programs
22.2.15 How to Make a Threaded Client
22.2.16 libmysqld, the Embedded MySQL Server Library
22.2.16.1 Overview of the Embedded MySQL Server Library
22.2.16.2 Compiling Programs with libmysqld
22.2.16.3 Restrictions when using the Embedded MySQL Server
22.2.16.4 Using Option Files with the Embedded Server
22.2.16.5 Things left to do in Embedded Server (TODO)
22.2.16.6 A Simple Embedded Server Example
22.2.16.7 Licensing the Embedded Server
22.3 MySQL PHP API
22.3.1 Common Problems with MySQL and PHP
22.4 MySQL Perl API
22.5 MySQL C++ API
22.5.1 Borland C++
22.6 MySQL Python API
22.7 MySQL Tcl API
22.8 MySQL Eiffel Wrapper
23 MySQL Connectors
23.1 MySQL ODBC Support
23.1.1 Introduction to MyODBC
23.1.1.1 What is ODBC?
23.1.1.2 What is Connector/ODBC?
23.1.1.3 What is MyODBC 2.50?
23.1.1.4 What is MyODBC 3.51?
23.1.1.5 Where to Get MyODBC
23.1.1.6 Supported Platforms
23.1.1.7 MyODBC Mailing List
23.1.1.8 MyODBC Forum
20 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
21 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
23.1.11.4 The Structure or Location of a Linked Table has been Changed. Can I See
Those Changes Locally in Linked Tables?
23.1.11.5 When I Insert or Update a Record in Linked Tables, I Get #DELETED#
23.1.11.6 How Do I Handle Write Conflicts or Row Location Errors?
23.1.11.7 Whenever I Export a Table from Access 97, a Strange Syntax Error
Occurs
23.1.11.8 Access Returns Another user has modified the record that you
have modified While Editing Records
23.1.11.9 How to Trap ODBC Login Error Messages in Access?
23.1.11.10 How Do I Optimize Access for Performance with MyODBC?
23.1.11.11 I Have Very Long Tables. What is the Best Configuration for MyODBC
to Access These Tables?
23.1.11.12 How to Set the QueryTimeout Value for ODBC Connections?
23.1.11.13 INFO: Tools to Export/Import from/to Access to/from MySQL
23.1.12 MyODBC and Microsoft VBA and ASP
23.1.12.1 Why Does SELECT COUNT(*) FROM tbl_name Return an Error?
23.1.12.2 Whenever I Use the AppendChunk() or GetChunk() ADO Methods, I Get
an Error Multiple-step operation generated errors. Check each status
value.
23.1.12.3 How to Find the Total Number of Rows Affected by a Particular SQL
Statement in ADO?
23.1.12.4 How Do I Handle Blob Data in Visual Basic?
23.1.12.5 How Do I Map Visual Basic Data Types to MySQL Types?
23.1.12.6 SAMPLES: VB with ADO, DAO and RDO
23.1.12.7 ASP and MySQL with MyODBC
23.1.12.8 INFO: Frequently Asked Questions on ActiveX Data Objects (ADO)
23.1.13 MyODBC and Third-Party ODBC Tools
23.1.13.1 How to Retrieve Data from MySQL into MS-Word/Excel Documents?
23.1.13.2 Exporting Tables from MS DTS to MySQL Using MyODBC Results in a
Syntax Error
23.1.13.3 HOWTO: Configure MySQL+MyODBC+unixODBC+ColdFusion on
Solaris
23.1.14 MyODBC General Functionality
23.1.14.1 How to Get the Value of an AUTO_INCREMENT Column in ODBC
23.1.14.2 Does MyODBC Support Dynamic Cursor Type?
23.1.14.3 What Causes Transactions are not enabled Errors?
23.1.14.4 What Causes Cursor not found Errors?
23.1.14.5 Can I Use MyODBC 2.50 Applications with MyODBC 3.51?
23.1.14.6 Can I Access MySQL from .NET Environment Using MyODBC?
23.1.14.7 Why Does MyODBC Perform Poorly, and Also Make a Lot of Disk
Activity for Relatively Small Queries?
23.1.15 Basic MyODBC Application Steps
23.1.16 MyODBC API Reference
23.1.17 MyODBC Data Types
23.1.18 MyODBC Error Codes
23.1.19 MyODBC With VB: ADO, DAO and RDO
23.1.19.1 ADO: rs.addNew, rs.delete, and rs.update
23.1.19.2 DAO: rs.addNew, rs.update, and Scrolling
23.1.19.3 RDO: rs.addNew and rs.update
23.1.20 MyODBC with Microsoft .NET
23.1.20.1 ODBC.NET: CSHARP(C#)
22 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
23.1.20.2 ODBC.NET: VB
23.1.21 Credits
23.2 MySQL Java Connectivity (JDBC)
24 Error Handling in MySQL
25 Extending MySQL
25.1 MySQL Internals
25.1.1 MySQL Threads
25.1.2 MySQL Test Suite
25.1.2.1 Running the MySQL Test Suite
25.1.2.2 Extending the MySQL Test Suite
25.1.2.3 Reporting Bugs in the MySQL Test Suite
25.2 Adding New Functions to MySQL
25.2.1 CREATE FUNCTION/DROP FUNCTION Syntax
25.2.2 Adding a New User-defined Function
25.2.2.1 UDF Calling Sequences for simple functions
25.2.2.2 UDF Calling Sequences for aggregate functions
25.2.2.3 Argument Processing
25.2.2.4 Return Values and Error Handling
25.2.2.5 Compiling and Installing User-defined Functions
25.2.3 Adding a New Native Function
25.3 Adding New Procedures to MySQL
25.3.1 Procedure Analyse
25.3.2 Writing a Procedure
A Problems and Common Errors
A.1 How to Determine What Is Causing a Problem
A.2 Common Errors When Using MySQL Programs
A.2.1 Access denied
A.2.2 Can't connect to [local] MySQL server
A.2.3 Client does not support authentication protocol
A.2.4 Password Fails When Entered Interactively
A.2.5 Host 'host_name' is blocked
A.2.6 Too many connections
A.2.7 Out of memory
A.2.8 MySQL server has gone away
A.2.9 Packet too large
A.2.10 Communication Errors and Aborted Connections
A.2.11 The table is full
A.2.12 Can't create/write to file
A.2.13 Commands out of sync
A.2.14 Ignoring user
A.2.15 Table 'tbl_name' doesn't exist
A.2.16 Can't initialize character set
A.2.17 File Not Found
A.3 Installation-Related Issues
A.3.1 Problems Linking to the MySQL Client Library
A.3.2 How to Run MySQL as a Normal User
A.3.3 Problems with File Permissions
A.4 Administration-Related Issues
A.4.1 How to Reset the Root Password
A.4.2 What to Do If MySQL Keeps Crashing
A.4.3 How MySQL Handles a Full Disk
23 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
24 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
25 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
26 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
27 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
28 of 29 07/06/2011 14:12
MySQL Reference Manual - Table of Contents file:///C:/Program Files/MySQL/MySQL Server 4.1/Docs/manual_toc.html
29 of 29 07/06/2011 14:12