---
title: "MySQL Connector | Lansweeper Platform"
slug: "mysql-connector"
description: "Use the MySQL connector in Lansweeper Flow Builder to query a MySQL relational database from your automated workflows."
updated: 2026-07-17T16:06:05Z
published: 2026-07-17T16:06:05Z
canonical: "docs.lansweeper.com/mysql-connector"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lansweeper.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MySQL Connector

Note on third‑party tools

              

We aim to provide accurate and helpful details about third‑party tools, but we can’t guarantee that this information is always complete or up to date. If you notice any discrepancies, feel free to share them in the feedback section below. For the most reliable information, please always refer to the third‑party tool’s official documentation.

[MySQL](https://www.mysql.com/) is a popular relational database system. This component allows you to query a MySQL database.

## Connections

### On-Premise Connection

Authenticate requests to a MySQL server.

Create a connection of type **On-Premise Connection** to authenticate with a MySQL server.

#### Configure the Connection

- **Host**: The publicly-accessible address of the MySQL server (e.g., `my-server.example.com`)
- **Port**: The port the database server is exposing (default: `3306`)
- **Database**: The name of the MySQL database to connect to
- **Username** (optional): The username for authenticating with the MySQL server
- **Password** (optional): The password for authenticating with the MySQL server

| Input | Comments | Default |
| --- | --- | --- |
| Host | The publicly-accessible address of the MySQL server. | my-server.example.com |
| Port | The port the database server is exposing. | 3306 |
| Database | The name of the MySQL database to connect to. |  |
| Username | The username for authenticating with the MySQL server. |  |
| Password | The password for authenticating with the MySQL server. |  |

## Actions

### Query Database

Executes a query against a MySQL database and returns the results.

| Input | Comments | Default |
| --- | --- | --- |
| Connection | The MySQL connection to use. |  |
| Query | The SQL query to execute against the MySQL server. Use '?' placeholders for parameterized values. | SELECT * FROM `table` WHERE `name` = ? AND `age` > ? |
| Parameters | The ordered list of values to bind to '?' placeholders in the query. Use this when the number of parameters is known at design time. Use either Parameters or Reference Parameters, not both. |  |
| Reference Parameters | A JSON array of values to bind to '?' placeholders, referenced from a previous step. Use this when the number of parameters is determined at runtime. Use either Parameters or Reference Parameters, not both. |  |
