top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Is it possible to access MYSQL Database through C program?

0 votes
420 views
Is it possible to access MYSQL Database through C program?
posted Aug 3, 2014 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

0 votes

Dont know the real requirement but we have MYSQL C Connector library and lot of material is available on the web. To download please follow this link - http://dev.mysql.com/downloads/connector/c/

answer Aug 3, 2014 by Pardeep Kohli
0 votes

Yes We can connect MYSQL Database through C program.

MySQL database does support C program API just like PHP or perl.

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.

Requirements

Make sure you have development environment installed such as gcc, mysql development package etc. Following is the list summarize the list of packages to compile program:

mysql: MySQL client programs and shared library
mysqlclient: Backlevel MySQL shared libraries (old libs)
mysql-devel: Files for development of MySQL applications (a must have)
mysql-server: Mysql server itself
gcc, make and other development libs: GNU C compiler

answer Aug 3, 2014 by Amit Kumar Pandey
Similar Questions
0 votes

Is it possible to connect database with c code, if yes then how?

If possible share the sample code for connecting to a MySQL database and run a sample query....

...