I need mysql.h for my c++ program.
Here is the Official MySQL connector for C++, as provided by the MySQL team.
From the link I posted, you can download an installer for your operating system (Windows I suppose since you mentionned cygwin).
I never used Eclipse but whatever the C++ compiler you use, you should be able to specify additional include/lib directories. Here you must add an entry which points to the installed MySQL C++ connector files.
I never had a try with cygwin myself though.
The main reason MySQL isn't already in the Cygwin package repository is that there's little point in running the MySQL server under Cygwin, as that would only slow it down and not provide any compensating benefit.
All you actually need, though, is the C API client library. It's easy enough to build it yourself.
First, download the source code tarball from mysql.com.
Then at a Cygwin prompt, say:
$ tar xvzf /wherever/it/is/mysql-5.1.46.tar.gz
$ cd mysql-5.1.46
$ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
--infodir=/usr/share/info --mandir=/usr/share/man \
--disable-shared --without-{debug,readline,libedit,server}
$ make
$ make install
That should build and install just the C client library parts, which should let your other code build.
The most critical part of that configure command is the --without-*
bit. Without that, it tries to build everything, which didn't work last time I tried it. You can't blame MySQL, Inc, for not patching Cygwin-specific bugs in the server, since you'd want to use the native binaries instead. There's no problem running a client linked to the Cygwin C library against a fully-native server, any more than there is running client and server on two entirely different OSes across a network.
Incidentally, after you get the C library up and running, you might want to look at MySQL++. (Disclaimer: I'm MySQL++'s primary maintainer.)