开发者

Accessing MySQL database from C

I am very new to MySQL.

Linux.

I want to create a database in MySql and using a C program I woul开发者_开发知识库d like to populate the data from a text file into the database.

I couldnt find much information on this :(

Is there any clear material on this? Can somebody please point me to the right direction?

Thanks.


MySQL comes with a client library and an ODBC connector. The client library is documented here http://dev.mysql.com/doc/refman/5.5/en/c-api-functions.html, the ODBC library is here http://dev.mysql.com/doc/refman/5.5/en/connector-odbc.html


Google? This is the first entry I get by searching for "Accessing MySQL database from C": http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html


The C API library is distributed with MySQL and is the basis for most other language bindings. Everything you need should be in the MySQL manual:

http://dev.mysql.com/doc/refman/5.5/en/c.html


There are quite a few good tutorials for this. Here are a couple resources.

  • MySQL C API
  • Official C API Documentation
  • Tutorial for those with decent programming background
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜