LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-05-2006, 08:49 PM   #1
cs-mania
LQ Newbie
 
Registered: Jul 2006
Posts: 2

Rep: Reputation: 0
Question How To Connect To Posgresql/mysql Database Using C


hello

i'm a new C programmer, could somebody help me with the C code if i want to connect to my database let say MySQL or PostgreSQL.

Let say i do have my database in localhost.

Can anyone give me any good reference links, that talks about this.

If i needs some library, could u tell me as well about this.
and how to install it.

Thanks
 
Old 07-05-2006, 08:57 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
The libs should already be installed with mysql, but Its hard to tell if you don't mention which disto.

This page should get you started with the programming.
 
Old 07-05-2006, 09:11 PM   #3
cs-mania
LQ Newbie
 
Registered: Jul 2006
Posts: 2

Original Poster
Rep: Reputation: 0
hi,

thanks for ur quick reply.

i'm using fedora core 4....

i was activate database server for mysql or postgresql

but i don't know how to start with the coding. how to connect to the database.

one more question, what is actually the "devel" means?
 
Old 07-05-2006, 09:18 PM   #4
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
devel means development, you might need to install the mysql-dev or mysql-devel packages.
 
Old 07-05-2006, 11:00 PM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,398
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
The postgreSQL web site has good documentation for their C language bindings/library. There are also some decent source code examples to help you get started.

--- rod.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
Unable to connect to (working) mySQL database rcs1000 Linux - Software 1 10-16-2005 07:23 AM
cannot connect to mysql database from php rocordial Linux - Software 2 08-21-2005 02:05 PM
cannot connect to mysql database externally lsimon4180 Linux - Software 17 03-02-2005 12:28 PM
cannot connect to mysql database mrosati Linux - Software 19 07-15-2004 02:40 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration