PDA

View Full Version : What is the package for mysql C connector?



luckyisdog
January 30th, 2013, 09:10 AM
I couldn't find the name anywhere, I've tried various installs of some other mysqls but it didn't quite get mysql.h my_global.h my_sys.h. Which one did you guys use for a quick installion of the connector?

spjackson
January 30th, 2013, 10:08 AM
libmysqld-dev

luckyisdog
January 31st, 2013, 08:18 AM
Ah still doesn't work on Eclipse. Added the library mysql.


Should I remove all other MySQL packages before installing this one?

spjackson
January 31st, 2013, 11:18 AM
Ah still doesn't work on Eclipse. Added the library mysql.

With libmysqld-dev installed, a command line to build a simple test is:


gcc mytest.c -o mytest -I/usr/include/mysql -lmysqlclient

How that translates into Eclipse, I'm not so sure.


Should I remove all other MySQL packages before installing this one?
No.

luckyisdog
January 31st, 2013, 06:51 PM
Oh so it uses the library mysqlclient? Alright I will try that. Thanks for your help! One question: can I still use this c library for c++ or is there a specific library?

luckyisdog
February 1st, 2013, 06:35 AM
Ahh got some problems including mysql.h my_global.h my_sys.h turns out that I needed to include them last because it looked like vector and fstream class were having problems with my_global.h weird.

Anyways it's working now. Thanks a lot for your help!