Registry / database / mysql-connector-cpp

mysql-connector-cpp

JSON →
library9.1.0vcpkgunverified

This is a release of MySQL Connector/C++, the C++ interface for communicating with MySQL servers.

vcpkg install mysql-connector-cpp
INSTALL
IMPORT
SIG · MYSQL-CONNECTOR-CP
M
mysql-connector-cpp
databasecppv9.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mysql/jdbc.h
#include <mysql/jdbc.h>

Connect to MySQL and execute a simple query.

#include <mysql/jdbc.h> #include <iostream> int main() { try { sql::mysql::MySQL_Driver *driver = sql::mysql::get_mysql_driver_instance(); std::unique_ptr<sql::Connection> conn(driver->connect("tcp://127.0.0.1:3306", "user", "password")); conn->setSchema("test"); std::unique_ptr<sql::Statement> stmt(conn->createStatement()); std::unique_ptr<sql::ResultSet> res(stmt->executeQuery("SELECT 'Hello World' AS msg")); while (res->next()) { std::cout << res->getString("msg") << std::endl; } } catch (sql::SQLException &e) { std::cerr << "Error: " << e.what() << std::endl; } return 0; }
Debug
Known issues
gotchaMySQL Connector/C++ requires the MySQL client library (libmysqlclient) and may need specific SSL configuration.
fix
Ensure MySQL client libraries are installed and link against the correct target (mysql-connector-cpp::mysql-connector-cpp).
affects: *
Upgrade
Version history
9.1.0latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources

No resource links recorded.

mysql-connector-cpp — pip install mysql-connector-cpp · libregistry