Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mysql and C Programming

Status
Not open for further replies.

carlg

Programmer
Jun 23, 2004
88
US
I am trying to write an application that uses the C programming language with mysql as a database.

I know there is a C programmers API out there and I see all of the documentation out there about it.

All of this documentation states that I should have a file out there called mysql.h

I also should have a library out there called mysqlclient.

I don't have either of these.

I did not install my mysql from binary or source distributiuons. I have Fedora 5 and I used their package management tool to install mysql.

I don't even have a /usr/local/mysql directory. My mysql executable is in /usr/bin

What do I need to do to my mysql installation to get it to work with C Programming?

THanks for the help

Carl
 
You would need to get the MySQL source (and build-dependencies) packages - the same versions as your server. I don't know how Fedora manages that, though I'd imagine it's quite easily available from the Fedora repository.

The location of your MySQL binaries is defined in /etc/mysql/my.cnf . No doubt it points to the correct location.
 
by default on RH ES/3 mysql.h is located in /usr/include/mysql/

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Think I got it to work

I did the following

yum install mysql-devel


And this installed everything I needed

Thanks for the help

Carl

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top