MySQL database does support C program API just like PHP or Perl API.
The C API code is distributed with MySQL. It is included in the mysqlclient library and allows C programs to access a database.
Many of the clients in the MySQL source distribution are written in C. If you are looking for examples that demonstrate how to use the C API, take a look at these clients. You can find these in the clients directory in the MySQL source distribution.
This tutorial provides a sample MySQL C program and step by step compilation instructions to kick start MySQL programming via C API. read more…