Setup for Examples
Set up the test database and user account required by MariaDB Connector/C code examples, including schema creation SQL and privilege grants for db_user.
Create the Schema
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 the User
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;
Password Guidance
Last updated
Was this helpful?

