Does anyone know of a simple way for a C++ program to communicate directly with a MySQL database? I have looked at MySQL++ and found it to be very confusing. If anyone kno
Use the C API:
http://dev.mysql.com/doc/refman/5.0/en/c.html
I have used MySQL++ with great success. I found it to be everything I was looking for in a MysQL database client library. The examples they provide are great, see here for a simple one.
If you know C++, it is much easier to use than the C library. It works great with Windows.
Use SQLAPI++ - it does SQL Server and more.
http://www.sqlapi.com/
MySQL Connector/C++ is a C++ implementation of JDBC 4.0
The reference customers who use MySQL Connector/C++ are: - OpenOffice - MySQL Workbench
Learn more: http://forums.mysql.com/read.php?167,221298
Are you sure that the C++ program needs to interact directly with the MySQL database?
I would suggest having the C++ program communicate with the web server using simple http requests, and let PHP handle the database. Data can be passed to a server-side PHP script via arguments, and data can be returned in XML format.
Writing: your.server.com/add_data.php?table="info"&data="0xFCBD..."
Reading: your.server.com/get_data.php?table="info"
MySQL has a beta release of MySQL Connector C++ that can be found Here. It's a connector written in C++ but modeled after Java's JDBC connectors. If you've used JDBC at all, this will feel almost identical. It's also cross platform and can be compiled on Linux, Windows, and Mac OS.