O’Reilly Media will be hosting the MySQL Conference in Santa Clara, California: April 12 - 15, 2010.
If you work with MySQL regularly and need a book on the topic with an easy to follow writing style and helpful examples, please consider buying MySQL in a Nutshell. If you already have the first edition, the second edition recently came out: it’s much better than the first edition and has had some great reviews. Click on the cover art work here and you’ll be taken to Amazon’s site where you can purchase a copy and have it mailed to you.
C API
This seciton is still being set up, but it contains documentation on the C API, used by the C programming language to interface with MySQL.
Connection Functions
These are C API functions related to connecting to MySQL.
Use this C API function to close the connection to the MySQL server.
This C API function is deprecated in favor of mysql_real_connect( ) for connecting to MySQL.
Use this C API function to establish a connection to a MySQL server.
Fetch Functions
These C API functions are used to retrieve, or fetch as they're labeled, data from MySQL.
This C API function returns a MYSQL_FIELD structure that provides information on a given field of a results set.
This C API function returns an array of information about the fields in a MySQL results set.
This C API function returns a MYSQL_FIELD structure that provides information on a given field of a results set referred to in the first argument of the function.
This C API function returns the length of each column within a particular row of a results set from MySQL.
Use this C API function to retrieve the next row of a results set from MySQL.
Use this C API function to execute the MySQL query given.
Information Functions
These are C API functions that provide information about the server or MySQL.
This C API function returns the MySQL client library version in a numeric format.
This C API function returns the hostname and the connection type for the current connection to MySQL.
This C API function returns a string containing the version of MySQL running on the server for the current connection.
This C API function returns a string containing information provided by MySQL when certain SQL statements are executed.
This C API function returns the identification number issued to the primary key of the last record inserted using INSERT in MySQL for the current connection.
Miscellaneous Functions
These are miscellaneous C API functions used to interface with MySQL. Basically, these are functions we have not yet classified in particular group yet.
- mysql_autocommit( )
- mysql_change_user( )
- mysql_character_set_name( )
- mysql_commit( )
- mysql_create_db( )
- mysql_data_seek( )
- mysql_debug( )
- mysql_drop_db( )
- mysql_dump_debug_info( )
- mysql_eof( )
- mysql_errno( )
- mysql_error( )
- mysql_escape_string( )
- mysql_field_count( )
- mysql_field_seek( )
- mysql_field_tell( )
- mysql_free_result( )
- mysql_get_character_set_info( )
- mysql_get_client_info( )
- mysql_get_proto_info( )
- mysql_get_server_version( )
- mysql_get_ssl_cipher( )
- mysql_hex_string( )
- mysql_init( )
- mysql_kill( )
- mysql_library_end( )
- mysql_library_init( )
- mysql_list_dbs( )
- mysql_list_fields( )
- mysql_list_processes( )
- mysql_list_tables( )
- mysql_more_results( )
- mysql_next_result( )
- mysql_num_fields( )
- mysql_num_rows( )
- mysql_ping( )
- mysql_real_escape_string( )
- mysql_real_query( )
- mysql_refresh( )
- mysql_reload( )
- mysql_rollback( )
- mysql_row_seek( )
- mysql_row_tell( )
- mysql_select_db( )
- mysql_set_character_set( )
- mysql_set_local_infile_default( )
- mysql_set_local_infile_handler( )
- mysql_set_server_option( )
- mysql_shutdown( )
- mysql_sqlstate( )
- mysql_ssl_set( )
- mysql_stat( )
- mysql_store_result( )
- mysql_thread_end( )
- mysql_thread_id( )
- mysql_thread_init( )
- mysql_thread_safe( )
- mysql_use_result( )
- mysql_warning_count( )
Return to MySQL Documentation page of our MySQL DocumentationUse this C API function to turn on or off auto-commit mode for the MySQL connection.
Use this C API function to change the current user for the MySQL session to the one given as the second argument.
This C API function returns the name of the default character set in use by the MySQL server.
Use this C API function to commit the current transaction of MySQL.
This C API function can be used to create a new database on the MySQL server, with the new database name is given as the second argument.
Use this C API function in conjunction with mysql_store_result( ) and a fetch function to change the current row being fetched from MySQL.
Use this C API function to set debugging if the client for MySQL was compiled with debugging.
This C API function may be used to delete the database named in the second argument of the function from the MySQL server.
Use this C API function to write debugging information about the current connection to the MySQL server's logfile.
Use this C API function to determine whether the last row of the results set has been fetched from MySQL.
This C API function returns the MySQL error number for the last function which was run if it failed to execute.
This C API function returns the MySQL error message for the last function which was run if it failed to execute.
This C API function will return a string or MySQL column given with special characters escaped by adding backslashes in front of them.
This C API function returns the number of columns in a results set from MySQL.
Use this C API function in conjunction with mysql_fetch_field( ) to change the current field being fetched to the one specified in the second argument of this function.
This C API function returns the value of the field pointer for the current row in use by a fetch function such as mysql_fetch_field( ).
Use this C API function to free memory allocated under particular conditions related to MySQL.
This C API function returns the default character set information for the MySQL database given.
This C API function returns the MySQL client library version.
This C API function returns the protocol version for the current connection to MySQL.
This C API function returns the version of the MySQL server for the current connection in a numeric format.
This C API function returns a string with the name of the SSL cipher which was used for the MySQL connection given.
This C API function can be used to translate a hexadecimal string to a format that can be used in a MySQL statement.
This C API function optionally allocates, and then initializes, a MYSQL object suitable for connecting to a MySQL server and subsequently performing many of the other operations.
Use this C API function to terminate a thread on the MySQL server.
Use this C API function to close the MySQL library after disconnecting from the server.
Use this C API function to initialize the MySQL library and any related libraries and systems before making any other MySQL function calls.
This C API function returns a results set containing a list of databases found for the current connection to MySQL.
This C API function returns a results set containing a list of fields found for the MySQL table given.
This C API function returns a results set containing a list of MySQL server processes or server threads found for the handle given as the argument to the function.
This C API function returns a results set containing a list of MySQL tables in the currently selected MySQL database.
Use this C API function to determine whether more results remain in a results set from MySQL when using the mysql_next_result() function to retrieve data.
Use this C API function to read the next row of data from a results set from MySQL.
This C API function returns the number of fields in each row of a results set from MySQL.
This C API function returns the number of rows in the results set from MySQL when issued after the mysql_store_result() function.
Use this C API function to determine whether the current MYSQL connection is still open.
This C API function writes a string or MySQL column given to a string named, but with special characters escaped by adding backslashes in front of them.
Use this C API function to execute a MySQL query given.
Use this C API function to flush caches and tables in MySQL.
This C API function instructs the MySQL server to reload the grants table.
Use this C API function to roll back or reverse the current transaction in MySQL.
Use this C API function to move the pointer of a MySQL result set to the row given.
This C API function returns the pointer for the current position in a results set from MySQL, generated from the mysql_store_result( ) function.
Use this C API function to select a different MySQL database for the current connection to MySQL.
Use this C API function to set the default character set of a MySQL connection to the character set given.
Use this C API function to set the handler for LOAD LOCAL DATA INFILE functions to the defaults necessary for internal use of the C client library when interacting with MySQL.
Use this C API function to enable callbacks that will be used with the LOAD DATA LOCAL INFILE statement in MySQL.
Use this C API function to enable or disable a MySQL server option.
Use this C API function to shut down the MySQL server.
This C API function returns the SQLSTATE error code for the last error in MySQL that occurred for the current connection to MySQL.
This C API function is used to make a secure connection to MySQL with SSL.
This C API function returns a character string containing information about the status of the MySQL server for the current connection.
Use this C API function to read and store all of a results set from MySQL in a MYSQL_RES structure.
Use this C API function before calling to free memory used by mysql_thread_init( ) related to MySQL.
This C API function returns the thread identifier number for the current connection to MySQL.
Use this C API function to initialize thread specific variables in MySQL.
Use this C API function to determine whether the MySQL client library is safe for a threaded environment.
Use this C API function to read the results of a MySQL query, one row at a time.
This C API function returns the number of MySQL warning messages encountered from the previous query.