Examples in this MariaDB Connector/C documentation depend on a database test and table contacts.
Create the example database and table:
CREATE DATABASE IF NOT EXISTS test; CREATE TABLE test.contacts ( id INT PRIMARY KEY AUTO_INCREMENT, first_name VARCHAR(25), last_name VARCHAR(25), email VARCHAR(100)) ENGINE=InnoDB;
Create a user db_user with privileges to execute the examples:
Passwords should meet your organization's password policies. If your MariaDB Enterprise Server instance has a password validation plugin installed, the password must also meet the configured requirements.
By default, MariaDB Enterprise Server installs the plugin, configured with system variables:
system variables.
CREATE USER IF NOT EXISTS db_user@192.0.2.1
IDENTIFIED BY 'db_user_password';GRANT ALL PRIVILEGES ON test.* TO db_user@192.0.2.1;This page is: Copyright © 2025 MariaDB. All rights reserved.