> 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="/files/5658b8136c464ac1db07b93f5d96ea7ae18c07f1" 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. A license is not required for use. If you need further assistance, please do not hesitate to contact us.

<a href="/spaces/ltcbXgy6Y2teLoU01eGk/pages/0f47fb1da0df390fa5c6266c109a2c94d9957f89" 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 purchase of a license (only *Download*) the library runs for **30 minutes as an unrestricted trial 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](/hub/codesys-hvac/en/overview/licensing.md).
{% endhint %}

### Overview

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

<figure><img src="/files/171c7640c80bd3ad40bf90caefdf2a30dab7cb68" alt="" width="563"><figcaption></figcaption></figure>

<p align="center">Execute SQL commands and conveniently read 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 from your CODESYS V3 application to a MySQL database. 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:

* continuously write measured values, counter readings and production data into tables
* read configuration data or recipes from the database
* provide historical data for trend curves and analyses
* pass data 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 (dependent on network/IT infrastructure)
* Storage of large amounts of data from the controller (e.g. IoT/field device data)
* Sample 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
