
3.1 Example C API Client Programs - MySQL
If you are looking for examples that demonstrate how to use the C API, take a look at those clients: Obtain a source distribution and look in its client directory. See How to Get MySQL. For information about individual C API functions, the sections for …
MySQL 8.0 C API Developer Guide
Apr 25, 2025 · The C API provides low-level access to the MySQL client/server protocol and enables C programs to access database contents. The C API code is distributed with MySQL and implemented in the libmysqlclient library.
3.2 Building C API Client Programs - MySQL
This section provides guidelines for compiling C programs that use the MySQL C API.
MySQL :: MySQL 8.0 C API Developer Guide :: 1 The MySQL C API
The C API provides low-level access to the MySQL client/server protocol and enables C programs to access database contents. The C API code is distributed with MySQL and implemented in the libmysqlclient library.
MySQL :: MySQL 8.0 C API Developer Guide :: 5.4.57 mysql_query()
mysql_query() cannot be used for statements that contain binary data; you must use mysql_real_query() instead. (Binary data may contain the \0 character, which mysql_query() interprets as the end of the statement string.) To determine whether a statement returns a result set, call mysql_field_count().
Sample code which uses Connector/C++ with classic C++ API
The following code demonstrates how to connect to MySQL Server using the classic C++ API. After the connection is established the code executes a simple SQL statement and reads the result from the server.
Chapter 6 C API Prepared Statement Interface - MySQL
The MySQL client/server protocol provides for the use of prepared statements. This capability uses the MYSQL_STMT statement handler data structure returned by the mysql_stmt_init() initialization function. Prepared execution is an efficient …
Sample code which uses Connector/C++ with X DevAPI - MySQL
The following Connector/C++ application connects to a MySQL Server over X protocol, creates a document collection, adds a few documents to it, queries the collection and displays the result. The sample code can be found in file testapp/devapi_test.cc in the source distribution of …
Chapter 2 MySQL C API Implementations
The MySQL C API is a C-based API that client applications written in C can use to communicate with MySQL Server. Client programs refer to C API header files at compile time and link to a C API library file, libmysqlclient, at link time.
Chapter 3 Writing C API-Based Client Applications - MySQL
The following sections provide information on building client applications that use the C API. Topics include compiling and linking clients, writing threaded clients, and troubleshooting runtime problems.