> For the complete documentation index, see [llms.txt](https://flowprodocs.wftutorials.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://flowprodocs.wftutorials.com/flowblocks/database/mysql-query.md).

# MySQL Query

MySQL Query block

### Description

This block allows you to run a MySQL query

### Properties

#### Connection String&#x20;

Takes a query string of the required connection parameters as shown below. This can be a string or a variable.

```
host=127.0.0.1&user=auser&password=pass
```

* host (string, host IP address)
* username (string, username of database connection)
* password&#x20;
* database
* port
* flags (check npm documentation)
* charset
* timezone
* connectTimeout
* ssl\_ca - Add a ssl certificate path
* insecureAuth

#### SQL Query

The query that needs to be executed. This can be a string or variable.

### Returns (Array of objects)

Returns an array of objects or an empty array

### NPM Package

The MySQL block uses this package to run its queries.

Package Name: mysql

Link: <https://www.npmjs.com/package/mysql>

Version: 2.18.1

Learn more about the connection options - <https://www.npmjs.com/package/mysql>
