C connectivity with mysql

I want to connect c with mysql database. want to do all the database transaction. i want some tutorial....

MySQL C API programming tutorial provides a tutorial with worked examples

No i already worked with this. Here the examples are not working.

When you say they are not working, are they compiling and linking (ld $executable) as expected?

"not working" is a useless description.

In what way are they not working?

I am compiling in the same way it is described:

gcc mysql.c -o mysql `mysql_config --cflags --libs`

during compilation I am getting following error:

fatal error: mysql.h: No such file or directory

compilation terminated

Try this:

mysql_config --cflags --libs --include

If it still doesn't work, you may not actually have the mysql headers installed, and no number of tutorials will be able to help you until you do.

How to install them depends on your system; what is it?

The option did not work throw the same error like previous.

I am using Fedora 15 in 32 bit system.

---------- Post updated at 02:08 PM ---------- Previous update was at 01:22 PM ----------

The problem got solved. I installed mysql-devel.

Its running now. But before that mysql service should be started. Then the object file should be executed.