Reputation: 103
is it possible to connect to an mysql database and issue queries using c++?
i found some sample code from the internet but they all use mysql! so u need to install mysql first on the computer.
what i want is to use a program from different locations where i don't have mysql installed to access a remote mysql database.
is this possible?
Upvotes: 5
Views: 2774
Reputation: 57678
I'm using MySQL Connector C++ to connect to a database. This is on Windows XP and Vista. I'm using it with Visual Studio 2008.
Your program creates a connection by specifying the URL to the computer where the database resides. Thus many instances of the application can access a remote database.
Upvotes: 0
Reputation: 10340
Warren Young has made a C++ library call Mysql++ you can find more info at: Mysql++
You could also take a look at: libmysql
Upvotes: 3
Reputation: 4985
Try libmysql
. You would probably need to write your own C++ wrapper for libmysql
calls but it's worth it. And, yes, you don't need to have local server installed.
Upvotes: 0
Reputation: 143061
You need mysql client libraries. You don't have to have mysql server installed. Details depend on your environment/packaging/etc.
Upvotes: 1