MariaDB Connector/C++ Sample Application
Setup
CREATE DATABASE IF NOT EXISTS todo;
CREATE TABLE todo. tasks (
id INT AUTO_INCREMENT PRIMARY KEY,
description VARCHAR(200),
completed BOOLEAN DEFAULT FALSE);CREATE USER IF NOT EXISTS db_user@192.0.2.1
IDENTIFIED BY 'db_user_password';
GRANT ALL PRIVILEGES ON todo.* TO db_user@192.0.2.1;sql::SQLString url("jdbc:mariadb://192.0.2.1:3306/todo");
sql::Properties properties({{"user", "db_user"}, {"password", "db_user_password"}});Compiling
Usage
Create
Read
Update
Delete
Last updated
Was this helpful?

