<p>I am going to be using C/C++, and would like to know the best way to talk to a MySQL server.  Should I use the library that comes with the server installation?  Are they any good libraries I should consider other than the official one?</p>

[{'answer_id': 23145, 'author': 'FreeMemory', 'author_id': 2132, 'author_profile': 'https://Stackoverflow.com/users/2132', 'pm_score': 3, 'selected': True, 'text': '<p><a href="http://tangentsoft.net/mysql++/" rel="nofollow noreferrer">MySQL++</a></p>\n'}, {'answer_id': 24372, 'author': 'Thomi', 'author_id': 1304, 'author_profile': 'https://Stackoverflow.com/users/1304', 'pm_score': 0, 'selected': False, 'text': "<p>That depends a bit on what you want to do.</p>\n\n<p>First, check out libraries that provide connectivity to more than on DBMS platform. For example, Qt makes it very easy to connect to MySQL, MS SQL Server and a bunch of others, and change the database driver (connection type) at runtime - with just a few lines of code.</p>\n\n<p>MySQL-specific libraries are fine, but bear in mind that you are locking yourself down to one DB implementation - if you ever need to change in the future it's gonna be a whole lot of work - even if you design your code such that the DB-specific stuff is behind a facade. Why not use a library that provides connectivity to multiple platforms, and save yourself the trouble?</p>\n"}, {'answer_id': 42487, 'author': 'Jason Etheridge', 'author_id': 2193, 'author_profile': 'https://Stackoverflow.com/users/2193', 'pm_score': 0, 'selected': False, 'text': '<p><a href="http://otl.sourceforge.net/" rel="nofollow noreferrer">OTL</a> is a solid cross-DBMS solution for C++ that my project has been using for years. We use it to talk to SQL Server (via ODBC) and Oracle (via OCI). It\'s fairly easy to drive, and comes with a large number of examples across all the supported databases.</p>\n'}, {'answer_id': 12964007, 'author': 'Mikhail T.', 'author_id': 1747834, 'author_profile': 'https://Stackoverflow.com/users/1747834', 'pm_score': 0, 'selected': False, 'text': '<p>There is nothing wrong with MySQL\'s own client-libraries. If you are willing to settle for <em>reduced functionality</em>, you can buy yourself some extra portability by using ODBC, UDBC, <a href="http://apr.apache.org/docs/apr/trunk/apr__dbd_8h.html" rel="nofollow">apr_dbd</a>, or some other database-abstraction library (such as the OTL offered already).</p>\n\n<p>This will make switching a back-end easier, but, as I mentioned, at the expense of offering less functionality compared to that of the native client. Because DB-vendors differ, the abstraction-libraries can only really offer the functions common to all (or most) of the back-ends. Whether you prefer to optimize for a particular DB or would rather make it easier to switch back-ends, is up to you (and, perhaps, your manager).</p>\n'}]
['https://Stackoverflow.com/questions/22901', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/522/']