# Setup for Examples

Examples in this MariaDB Connector/C documentation depend on a database `test` and table `contacts`.

## Create the Schema

Create the example database and table:

> ```sql
> 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 a user `db_user` with privileges to execute the examples:

> ```sql
> CREATE USER IF NOT EXISTS db_user@192.0.2.1
>     IDENTIFIED BY 'db_user_password';
> ```
>
> ```sql
> GRANT ALL PRIVILEGES ON test.* TO db_user@192.0.2.1;
> ```

### Password Guidance

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 [simple\_password\_check](/docs/server/reference/plugins/password-validation-plugins/simple-password-check-plugin.md) plugin, configured with system variables:

* [simple\_password\_check\_digits](/docs/server/reference/plugins/password-validation-plugins/simple-password-check-plugin.md#simple_password_check_digits)
* [simple\_password\_check\_letters\_same\_case](/docs/server/reference/plugins/password-validation-plugins/simple-password-check-plugin.md#simple_password_check_letters_same_case)
* [simple\_password\_check\_minimal\_length](/docs/server/reference/plugins/password-validation-plugins/simple-password-check-plugin.md#simple_password_check_minimal_length)
* [simple\_password\_check\_other\_characters](/docs/server/reference/plugins/password-validation-plugins/simple-password-check-plugin.md#simple_password_check_other_characters) system variables.

<sub>*This page is: Copyright © 2025 MariaDB. All rights reserved.*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/connectors/mariadb-connector-c/setup-for-examples.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
