Question

If I have to download Connector would I also need to download it on any computer I want to use the C++ application on? I haven't started any code for the database part yet but I'm writing an application that reads data and I want to store that in a mysql database using C++.

Was it helpful?

Solution

Is Using MySql Connector/C++ necessary in order to access/change mysql database?

You don't have to connect to the official MySQL connector. You can use ODBC or other custom connectors.

If I have to download Connector would I also need to download it on any computer I want to use the C++ application on?

It depends whether you link to the MySQL connector library statically or dynamically.

  • Linking statically is achieved by linking against the static MySQL connector library, usually named libmysqlcppconn-static.a (or .lib on windows), and will allow you to run your program on environments where the mysql connector is not installed.
  • Linking dynamically is achieved by linking against the dynamic MySQL connector library, usually named libmysqlcppconn.so (or .dll on windows, .dylib on macOS), and will require your program to run on environments where the mysql connector has been installed.

This question discusses the tradeoffs of static vs. dynamic linking in more details.

This questions discusses the licensing implications of using MysQL connector.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top