> For the complete documentation index, see [llms.txt](https://support.powerio.com/hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.powerio.com/hub/codesys-hvac/en/mysql-library/description.md).

# Description

{% columns %}
{% column width="25%" %}

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2FdOJwKtwbOHFGLxWNs55Z%2FpowerIO%20Icon%20MySQL%20Lib.png?alt=media&amp;token=5ee8d0b2-7ebf-4605-8038-46f45c2aa69d" alt="" width="100"><figcaption></figcaption></figure>
{% endcolumn %}

{% column width="75%" %}
The MySQL Library SL enables a direct connection between a MySQL database and a CODESYS V3 control application to read and write data – without additional drivers or additional software on the controller.
{% endcolumn %}
{% endcolumns %}

***

So you can get started right away, we offer the library as a download. No license is required to use it. If you need further support, please do not hesitate to contact us.

<a href="https://support.powerio.com/hub/downloads/en/codesys-hvac-downloads/mysql-library.md" class="button primary" data-icon="up-right-from-square">Download</a> <a href="https://store.codesys.com/de/mysql-library-sl.html" class="button secondary" data-icon="seal">Purchase license</a> <a href="https://www.powerio.com/de/kontakt" class="button secondary" data-icon="question">Get support</a>

{% hint style="info" %}
**Licensing:**

Without purchasing a license (only *Download*) the library runs for **30 minutes as an unrestricted demo version**. For productive use, a Single License (SL) / single-device license is required per controller.\
For instructions on installing licenses, please visit the page [Product Licensing](https://support.powerio.com/hub/codesys-hvac/en/overview/licensing.md).
{% endhint %}

### Overview

{% columns %}
{% column width="91.66666666666666%" %}

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2FpeK5GDxMXaDCziSGjj0k%2FScreenshot%202025-11-20%20at%2023.49.37.png?alt=media&amp;token=892426e7-14e2-4f99-baec-14b33e7f12a5" alt="" width="563"><figcaption></figcaption></figure>

<p align="center">Executing SQL commands and conveniently reading query results directly from the CODESYS application.</p>
{% endcolumn %}

{% column width="8.333333333333343%" %}

{% endcolumn %}
{% endcolumns %}

***

### Description

With the MySQL Library SL, you can send SQL queries to a MySQL database from your CODESYS V3 application. Standard SQL operations such as INSERT, SELECT, UPDATE, DELETE as well as other commands (e.g. ALTER, DROP, etc.) are supported.

For example, you can:

* Write measured values, meter readings, and production data continuously into tables
* Read configuration data or recipes from the database
* provide historical data for trend curves and evaluations
* pass data on to third-party systems for further processing (ERP, SCADA, Reporting)

Key features:

* Direct connection to external or internal MySQL databases
* No additional drivers or middleware required on the PLC
* Worldwide access possible (depending on network/IT infrastructure)
* Storage of large amounts of data from the controller (e.g. IoT/field device data)
* Example project (CFC/ST) with visualization for a quick start

***

### Details

| **Documentation Version**      | <code class="expression">space.vars.HVACFAM\_Library\_latest</code>            |
| ------------------------------ | ------------------------------------------------------------------------------ |
| **Placeholder**                | `MySQL`                                                                        |
| **Available in CODESYS Store** | *No*                                                                           |
| **Programming system**         | *CODESYS V3.5.17.2 or higher*                                                  |
| **Runtime system**             | *CODESYS Control V4.2.0.0 or higher*                                           |
| **Licensing**                  | *Single License (single-device license)*                                       |
| **License**                    | [MySQL Library License SL](https://store.codesys.com/de/mysql-library-sl.html) |

***


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://support.powerio.com/hub/codesys-hvac/en/mysql-library/description.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
