---
title: "MySql@1"
description: "MySql@1 — MySQL, MariaDB and MySQL-compatible databases over MySqlConnector, no driver needed"
url: "https://docs.justcat.it/reference/data-sources/providers/mysql-1/"
---
# MySql@1


## Connects to

MySQL, on premises or hosted, and every major variant of it: MariaDB, Amazon Aurora MySQL, Azure Database for MySQL, Google Cloud for MySQL, Percona Software for MySQL — anything that speaks the MySQL wire protocol. If you are not sure your server qualifies, check the driver's <a href="https://mysqlconnector.net/#server-compatibility" target="_blank">server compatibility list</a>.

## Example

A MariaDB server running locally on your computer:


**Properties**



Name
: DWH

Provider
: MySql@1

Technology
: MariaDB

Connection string
: ```
  Server=localhost;
  Database=aero;
  User ID=root;
  Password=%TESTING_PASSWORD%;
  ```





**YAML**


```yaml
Data sources:
- Name: DWH
  Provider: MySql@1
  Technology: MariaDB
  Connection string: >
    Server=localhost;
    Database=aero;
    User ID=root;
    Password=%TESTING_PASSWORD%;
```




## Connection string

A standard MySqlConnector connection string — `Key=Value` pairs separated by semicolons. The keys you will use most:

| Key | Meaning |
|---|---|
| `Server` | Server name or address |
| `Port` | `3306` unless your server says otherwise |
| `Database` | Database to connect to |
| `User ID`, `Password` | Credentials |
| `SslMode` | `Required` for hosted databases — Azure, Aurora and Google Cloud insist on it |
| `Default Command Timeout` | Default statement timeout in seconds; a test's own `Timeout` overrides it — see [How every provider is used](https://docs.justcat.it/reference/data-sources/providers/introduction/#how-every-provider-is-used "How every provider is used") |

The full list is in the <a href="https://mysqlconnector.net/connection-options/" target="_blank">MySqlConnector documentation</a>; the driver itself is described at <a href="https://mysqlconnector.net" target="_blank">mysqlconnector.net</a> and on <a href="https://github.com/mysql-net/MySqlConnector" target="_blank">GitHub</a>.

A password, or the whole string, can come from an environment variable — `%NAME%` is replaced with the value of `NAME`; see [How every provider is used](https://docs.justcat.it/reference/data-sources/providers/introduction/#how-every-provider-is-used "How every provider is used").

### Azure Database for MySQL

A hosted database needs `SslMode=Required`:


**Properties**



Name
: Azure DWH

Provider
: MySql@1

Technology
: AzureDatabaseForMySql

Connection string
: ```
  Server=aero.mysql.database.azure.com;
  User ID=craftsman;
  Password=%TESTING_PASSWORD%;
  Database=Aero;
  SslMode=Required;
  ```





**YAML**


```yaml
Data sources:
- Name: Azure DWH
  Provider: MySql@1
  Technology: AzureDatabaseForMySql
  Connection string: >
    Server=aero.mysql.database.azure.com;
    User ID=craftsman;
    Password=%TESTING_PASSWORD%;
    Database=Aero;
    SslMode=Required;
```




## Settings

None beyond `Connection string`.

## Query

One SQL statement in MySQL's dialect that returns a result set — a `SELECT`, or a `CALL` of a stored procedure that returns one.

## Prerequisites

None. The driver ships with CAT. Windows; on Linux it has no extra dependencies and is expected to work, but it has not been tested there.

## Serving test and data source definitions

`MySql@1` can also serve [lists](https://docs.justcat.it/reference/project-file/lists/ "Lists") of definitions: any statement that returns the columns of a [test](https://docs.justcat.it/reference/tests/properties/ "Test properties"), [data source](https://docs.justcat.it/reference/data-sources/properties/ "Data source properties") or [query](https://docs.justcat.it/reference/queries/properties/ "Query properties") definition works. Ready-made table scripts are in [Store definitions in a database](https://docs.justcat.it/how-to-guides/organize-and-run-tests/store-definitions-in-a-database/ "Store definitions in a database").

## Related

* [Technologies](https://docs.justcat.it/reference/data-sources/technologies/ "Technologies") — the MySQL-compatible platforms this provider serves.

