> For the complete documentation index, see [llms.txt](https://doc.telosys.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.telosys.org/project-databases/mariadb-database.md).

# MariaDB database

## Telosys database configuration

Below are examples of typical configurations for a **MariaDB** database.

### Since Telosys 4.3

```yaml
  - id: mariadb
    name: MariaDB 'cars' database 
    type: MARIADB 
    # URL jdbc:mariadb://<host>:<port>/<database>?<options>
    url: jdbc:mariadb://myhost:3305/carsdb
    user: john_doe
    password: not_to_reveal
```

### Before Telosys 4.3

```yaml
  - id: mariadb
    name: MariaDB 'cars' database 
    type: MARIADB 
    # JDBC driver 
    driver: org.mariadb.jdbc.Driver
    # URL jdbc:mariadb://<host>:<port>/<database>?<options>
    url: jdbc:mariadb://myhost:3305/carsdb
    user: john_doe
    password: not_to_reveal
    # Metadata parameters
    tableNamePattern: '%'
    tableTypes: TABLE
```

### JDBC driver

* Download:&#x20;
  * Web site:  <https://mariadb.com/downloads/connectors/connectors-data-access/> \
    "Java 8+ Connector"
  * MVN Repository: <https://mvnrepository.com/search?q=mariadb>  \
    "MariaDB Java Client"
* JAR file example:  `mariadb-java-client-3.5.6.jar`
* Driver class name:  **org.mariadb.jdbc.Driver**

## Technical information about MariaDB

### Structure

Server → **Database** (= **Schema**) → Tables/Objects

<div align="left"><figure><img src="/files/mfLZc34c1Jm4tPnYnbbv" alt="" width="242"><figcaption></figcaption></figure></div>

* **Database**: The main organizational unit. \
  In practice, a "**database**" is what most people think of as a "**schema**". \
  When you run `CREATE DATABASE`, it’s like creating a schema.
* **Schema**: Synonymous with database. \
  `CREATE DATABASE foo;`   and  `CREATE SCHEMA foo;`  are the same operation.
* **Cross-database** queries (cross-schema) are allowed within the same server instance (`db1.table1 JOIN db2.table2`)

### Case conversion rules

* **column name**: \
  in MariaDB, column names are **not case-sensitive**, \
  whether the identifiers are in quotes or not.
* **table name** (file system rules matter):\
  \- on **Linux**: may be case-sensitive only if  `lower_case_table_names=0`\
  \- on **Windows**/**macOS**:  case-insensitive.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://doc.telosys.org/project-databases/mariadb-database.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.
